@Test
public void testRevisionNameSerializer() throws IOException
{
RevisionName value = null;
try
{
serializer.serialize( value );
fail();
}
catch ( Exception e )
{
//exptected
}
// ------------------------------------------------------------------
value = new RevisionName( 1L, null );
byte[] result = serializer.serialize( value );
assertEquals( 12, result.length );
assertEquals( 1L, ( long ) LongSerializer.deserialize( result ) );
assertNull( StringSerializer.deserialize( result, 8 ) );
assertEquals( value, serializer.deserialize( new BufferHandler( result ) ) );
// ------------------------------------------------------------------
value = new RevisionName( 0L, "" );
result = serializer.serialize( value );
assertEquals( value, serializer.deserialize( new BufferHandler( result ) ) );
// ------------------------------------------------------------------
value = new RevisionName( 0L, "L\u00E9charny" );
result = serializer.serialize( value );
assertEquals( value, serializer.deserialize( new BufferHandler( result ) ) );
}