try
{
Serializer serializer = new Serializer();
byte[] data = serializer.serialize(tShirtType);
Object obj = serializer.deserialize(data);
// assert instanceof
assertTrue(obj instanceof CompositeType);
// if instanceof passes continue otherwise we will not get to the rest
CompositeType type = (CompositeType)obj;