@Test
public void appliesFix() throws Exception {

  FakeWebpConverter fakeConverter = new FakeWebpConverter();
  byte[] bytes = new byte[] {0, 1, 2, 4, 8};
  fakeConverter.setFakeData(bytes);
  File pngFile = File.createTempFile("foo", ".png");
  Files.copy(getTestDataFile("webp/drawing.png"), pngFile);
  Path pngPath = pngFile.toPath();
  new WebpAutoFix(pngPath, fakeConverter).apply();
  File webpFile =
      new File(
          pngPath
              .resolveSibling(MoreFiles.getNameWithoutExtension(pngPath) + ".webp")
              .toString());
  assertThat(pngFile.exists()).isFalse();
  assertThat(webpFile.exists()).isTrue();
  assertThat(Files.asByteSource(webpFile).read()).isEqualTo(bytes);
  webpFile.delete();
}