MaxKey key2 = (MaxKey) objectInputStream.readObject();
}
@Test
public void testSerializeBinary() throws Exception {
Binary binary = new Binary((byte)0x00 , "hello world".getBytes());
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
objectOutputStream.writeObject(binary);
ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
Binary binary2 = (Binary) objectInputStream.readObject();
assertArrayEquals(binary.getData(), binary2.getData());
assertEquals(binary.getType(), binary2.getType());
}