@Test
public void testComputePrf_sameInputDifferentInterfacesSameValue() throws Exception {

  HkdfStreamingPrf prf =
      new HkdfStreamingPrf(HashType.SHA1, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8));
  InputStream input = prf.computePrf("input".getBytes(UTF_8));
  byte[] output = new byte[100];
  assertThat(input.read(output)).isEqualTo(100);
  // Use the other interface to read the input.
  InputStream input2 = prf.computePrf("input".getBytes(UTF_8));
  byte[] output2 = new byte[100];
  output2[0] = (byte) input2.read();
  output2[1] = (byte) input2.read();
  assertThat(input2.read(output2, 2, 33)).isEqualTo(33);
  output2[35] = (byte) input2.read();
  assertThat(input2.read(output2, 36, 64)).isEqualTo(64);
  assertThat(output).isEqualTo(output2);
}