diff --git a/documentation-support/src/test/java/tech/picnic/errorprone/documentation/BugPatternExtractorTest.java b/documentation-support/src/test/java/tech/picnic/errorprone/documentation/BugPatternExtractorTest.java index 1737f32ac46..da6467c78de 100644 --- a/documentation-support/src/test/java/tech/picnic/errorprone/documentation/BugPatternExtractorTest.java +++ b/documentation-support/src/test/java/tech/picnic/errorprone/documentation/BugPatternExtractorTest.java @@ -14,7 +14,6 @@ import com.google.errorprone.matchers.Description; import com.sun.source.tree.ClassTree; import java.io.IOException; -import java.nio.file.Files; import java.nio.file.Path; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -120,7 +119,8 @@ void bugPatternAnnotationIsAbsent() { private static void verifyFileMatchesResource( Path outputDirectory, String fileName, String resourceName) throws IOException { - assertThat(Files.readString(outputDirectory.resolve(fileName))) + assertThat(outputDirectory.resolve(fileName)) + .content(UTF_8) .isEqualToIgnoringWhitespace(getResource(resourceName)); }