### Question:
BooleanSerializer extends AbstractElementSerializer<Boolean> { private BooleanSerializer() { super( BooleanComparator.INSTANCE ); } private  BooleanSerializer(); byte[] serialize( Boolean element ); static byte[] serialize( boolean element ); static byte[] serialize( byte[] buffer, int start, boolean element ); static Boolean deserialize( byte[] in ); static Boolean deserialize( byte[] in, int start ); Boolean fromBytes( byte[] in ); Boolean fromBytes( byte[] in, int start ); Boolean deserialize( ByteBuffer buffer ); @Override Boolean deserialize( BufferHandler bufferHandler ); static final BooleanSerializer INSTANCE; }### Answer:
@Test public void testBooleanSerializer() throws IOException { boolean value = true; byte[] result = BooleanSerializer.serialize( value ); assertEquals( ( byte ) 0x01, result[0] ); assertEquals( value, serializer.deserialize( new BufferHandler( result ) ).booleanValue() ); value = false; result = BooleanSerializer.serialize( value ); assertEquals( ( byte ) 0x00, result[0] ); assertEquals( value, serializer.deserialize( new BufferHandler( result ) ).booleanValue() ); }