### Question:
StringEqualsJunitReporter extends AbstractReporter { @Override public void notTheSame(byte[] oldValue, File fileForVerification, byte[] newValue, File fileForApproval) { Assert.assertEquals(new String(oldValue, StandardCharsets.UTF_8), new String(newValue, StandardCharsets.UTF_8)); }  @Override void notTheSame(byte[] oldValue, File fileForVerification, byte[] newValue, File fileForApproval); @Override void approveNew(byte[] value, File fileForApproval, File fileForVerification); @Override boolean canApprove(File fileForApproval);  }### Answer:
@Test public void shouldProperlyThrowAJunitComparisonError() throws Exception { REPORTER.notTheSame(EXPECTED.getBytes(StandardCharsets.UTF_8), new File("test"), EXPECTED.getBytes(StandardCharsets.UTF_8), new File("other")); try { REPORTER.notTheSame(EXPECTED.getBytes(StandardCharsets.UTF_8), new File("test"), ACTUAL.getBytes(StandardCharsets.UTF_8), new File("other")); Assert.fail("Should fail"); } catch (ComparisonFailure e) { Assert.assertEquals(e.getExpected(), EXPECTED); Assert.assertEquals(e.getActual(), ACTUAL); } }