@Test(expected=NumberFormatException.class)
public void checkFromHexStringInvalidStringReturnsException() {

    ByteBuffer buffer = ByteBufferDumper.fromHexString("non-hexastring");
    assertEquals(1, buffer.remaining());
    assertEquals(-1, buffer.get());
}