public void testEventDef() 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);
atts.put(DefDescriptorImpl.getInstance("testString", AttributeDef.class), new AttributeDefImpl(
DefDescriptorImpl.getInstance("testString", AttributeDef.class), null, type, null, true,
AttributeDef.SerializeToType.BOTH, null, null));
atts.put(DefDescriptorImpl.getInstance("testInt", AttributeDef.class),
new AttributeDefImpl(DefDescriptorImpl.getInstance("testInt", AttributeDef.class), null, type2, null,
true, AttributeDef.SerializeToType.BOTH, null, null));
EventDefImpl def = vendor.makeEventDef(desc, EventType.COMPONENT, atts, null, null);
def.validateDefinition();
assertEquals(EventType.COMPONENT, def.getEventType());
Map<DefDescriptor<AttributeDef>, AttributeDef> map = def.getDeclaredAttributeDefs();