@Test
public void testGetChecksumAsString() throws NoSuchAlgorithmException, IOException {

  final Object[][] testParameters = new Object[][] {
      {new ByteArrayInputStream(new byte[] {1, 2, 3}), "Uonfc331cyb83SJZevsfrA=="},
      {new ByteArrayInputStream(new byte[] {4, 5, 6, 7, 8}), "ounpxAX8tCgIz6Dq8lJ8Nw=="},
      {new ByteArrayInputStream(new byte[] {9, 10, 11, 12, 13, 14, 15}),
          "sMsYm49mZGqQKjnDDyPDow=="}};
  for (final Object[] testParameter : testParameters) {
    String expected = (String) testParameter[1];
    InputStream in = (InputStream) testParameter[0];
    assertEquals(expected, IoUtils.getChecksumAsString(in));
  }
}