@Test
public void testComputePrf_exhaustStream() throws Exception {

  HkdfStreamingPrf prf =
      new HkdfStreamingPrf(HashType.SHA512, "key0123456".getBytes(UTF_8), "salt".getBytes(UTF_8));
  InputStream input = prf.computePrf("input".getBytes(UTF_8));
  final int maxOutputLength = 255 * (512 / 8);
  byte[] output = new byte[maxOutputLength + 50];
  assertThat(input.read(output)).isEqualTo(maxOutputLength);
}