@Test @Ignore public void NullPointerException() { final Bytes bytes = ByteBufferBytes.wrap(ByteBuffer.allocate(1024).order(ByteOrder.nativeOrder())); NullPointerException expected = new NullPointerException("test"); bytes.writeObject(expected); bytes.position(0); NullPointerException actual = (NullPointerException) bytes.readObject(); Assert.assertEquals(expected, actual); }