@Test public void testDigestChangesOnWrite() throws java.io.IOException {

  DeadEndDigestOutputStream stream = new DeadEndDigestOutputStream();
  String originalDigest = stream.getDigestString();
  stream.write(123);
  assertThat(originalDigest, not(equalTo(stream.getDigestString())));
  stream.close();
}