File file = temp.newFile("example.html");
file.delete();
DifferenceSinkFactory factory = repo.getDifferenceSinkFactory(file.toURI());
DifferenceSink sink = factory.createSink(SIMPLE, new TestContext.Empty());
try {
Simple expected = new Simple();
expected.text = "expected";
Simple actual = new Simple();
actual.text = "actual";
sink.put(new Difference(
SIMPLE.toReflection(expected),
SIMPLE.toReflection(actual),
"testing"));
} finally {
sink.close();
}
assertThat(file.exists(), is(true));
}