MessageDigestCollector { public void reset() { stream = new ByteArrayOutputStream(); } MessageDigestCollector(); void append(byte[] bytes); byte[] digest(ProtocolVersion version, CipherSuite suite); void reset(); byte[] getRawBytes(); void setRawBytes(byte[] rawBytes);  }
@Test public void testReset() { digest.setRawBytes(testarray); assertArrayEquals(testarray, digest.getRawBytes()); digest.reset(); assertArrayEquals(digest.getRawBytes(), new byte[0]); }