@Test
public void testFromOnByte() throws IOException {

  final Object[][] testParameters =
      new Object[][] {{new ByteArrayInputStream(new byte[] {1, 2, 3}), new byte[] {1, 2, 3}},
          {new ByteArrayInputStream(new byte[] {4, 5, 6, 7, 8}), new byte[] {4, 5, 6, 7, 8}},
          {new ByteArrayInputStream(new byte[] {9, 10, 11, 12, 13, 14, 15}),
              new byte[] {9, 10, 11, 12, 13, 14, 15}}};
  for (final Object[] testParameter : testParameters) {
    byte[] expected = (byte[]) testParameter[1];
    InputStream in = (InputStream) testParameter[0];
    byte[] actual = IoUtils.from(in);
    for (int i = 0; i < actual.length; ++i) {
      assertEquals(expected[i], actual[i]);
    }
  }
}