public void testGetAttributeDefs() throws Exception {
DefDescriptor<EventDef> desc = DefDescriptorImpl.getInstance("fake:event", EventDef.class);
Map<DefDescriptor<AttributeDef>, AttributeDef> atts = new HashMap<>();
DefDescriptor<TypeDef> type = DefDescriptorImpl.getInstance("String", TypeDef.class);
DefDescriptor<TypeDef> type2 = DefDescriptorImpl.getInstance("Integer", TypeDef.class);
AttributeDefImpl att1 = new AttributeDefImpl(DefDescriptorImpl.getInstance("testString", AttributeDef.class),
null, type, null, true, AttributeDef.SerializeToType.BOTH, null, null);
AttributeDefImpl att2 = new AttributeDefImpl(DefDescriptorImpl.getInstance("testInt", AttributeDef.class),
null, type2, null, true, AttributeDef.SerializeToType.BOTH, null, null);
atts.put(att1.getDescriptor(), att1);
atts.put(att2.getDescriptor(), att2);
EventDefImpl def = vendor.makeEventDefWithNulls(desc, EventType.COMPONENT, atts, null, null);
Map<DefDescriptor<AttributeDef>, AttributeDef> returnedAttributes = def.getAttributeDefs();
Map<DefDescriptor<AttributeDef>, AttributeDef> expectedAttributes = new Hashtable<>();
expectedAttributes.put(att1.getDescriptor(), att1);
expectedAttributes.put(att2.getDescriptor(), att2);
assertEquals(expectedAttributes, returnedAttributes);
}