BinaryToHexConverter { public static String toHexString(final byte[] array) throws IOException { return toHexString(new ByteArrayInputStream(array)); } private  BinaryToHexConverter(); static String createDebugMessageByTryingToConvertToHexString(final ByteBuffer byteBuffer); static String toHexString(final byte[] array); static String toHexString(final ByteBuffer byteBuffer); static String toHexString(final InputStream inputStream);  }
@Test public void hexStringFromByteArrayWorks() throws IOException { assertThat(BinaryToHexConverter.toHexString(TEST_VECTOR)).isEqualTo(EXPECTED_STRING); }
@Test public void hexStringFromByteBufferWorks() throws IOException { assertThat(BinaryToHexConverter.toHexString(ByteBuffer.wrap(TEST_VECTOR))).isEqualTo(EXPECTED_STRING); }
@Test public void hexStringFromInputStream() throws IOException { assertThat(BinaryToHexConverter.toHexString(new ByteArrayInputStream(TEST_VECTOR))).isEqualTo(EXPECTED_STRING); }