public class TestTyperefUnion
{
@Test
public void testTyperefUnion()
{
TyperefInfo typerefInfo = DataTemplateUtil.getTyperefInfo(Union.class);
assertNotNull(typerefInfo);
TyperefDataSchema typerefDataSchema = typerefInfo.getSchema();
Union union = new Union();
assertTrue(union instanceof HasTyperefInfo);
TyperefInfo typerefInfoFromInstance = union.typerefInfo();
assertNotNull(typerefInfoFromInstance);
TyperefDataSchema typerefDataSchemaFromInstance = typerefInfo.getSchema();
assertSame(typerefDataSchemaFromInstance, typerefDataSchema);
assertSame(typerefInfoFromInstance, typerefInfo);