}
}
@Test
public void primitiveSerialization() {
DataOutput out = serialize.getDataOutput(128, true);
out.writeObjectNotNull(Boolean.FALSE);
out.writeObjectNotNull(Boolean.TRUE);
out.writeObjectNotNull(Byte.MIN_VALUE);
out.writeObjectNotNull(Byte.MAX_VALUE);
out.writeObjectNotNull(new Byte((byte) 0));
out.writeObjectNotNull(Short.MIN_VALUE);
out.writeObjectNotNull(Short.MAX_VALUE);
out.writeObjectNotNull(new Short((short) 0));
out.writeObjectNotNull(Character.MIN_VALUE);
out.writeObjectNotNull(Character.MAX_VALUE);
out.writeObjectNotNull(new Character('a'));
out.writeObjectNotNull(Integer.MIN_VALUE);
out.writeObjectNotNull(Integer.MAX_VALUE);
out.writeObjectNotNull(new Integer(0));
out.writeObjectNotNull(Long.MIN_VALUE);
out.writeObjectNotNull(Long.MAX_VALUE);
out.writeObjectNotNull(new Long(0));
out.writeObjectNotNull(FloatSerializer.MIN_VALUE);
out.writeObjectNotNull(FloatSerializer.MAX_VALUE);
out.writeObjectNotNull(new Float((float) 0.0));
out.writeObjectNotNull(DoubleSerializer.MIN_VALUE);
out.writeObjectNotNull(DoubleSerializer.MAX_VALUE);
out.writeObjectNotNull(new Double(0.0));
ReadBuffer b = out.getStaticBuffer().asReadBuffer();
assertEquals(Boolean.FALSE, serialize.readObjectNotNull(b, Boolean.class));
assertEquals(Boolean.TRUE, serialize.readObjectNotNull(b, Boolean.class));
assertEquals(Byte.MIN_VALUE, serialize.readObjectNotNull(b, Byte.class).longValue());
assertEquals(Byte.MAX_VALUE, serialize.readObjectNotNull(b, Byte.class).longValue());
assertEquals(0, serialize.readObjectNotNull(b, Byte.class).longValue());