Map<DefDescriptor<AttributeDef>, AttributeDef> atts = new HashMap<>();
DefDescriptor<TypeDef> type = DefDescriptorImpl.getInstance("String", 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));
EventDefImpl eventDef = vendor.makeEventDef(eventDesc, EventType.COMPONENT, atts, null, null);
context.getDefRegistry().addLocalDef(eventDef);
String res = Json.serialize(context, context.getJsonSerializationContext());
assertTrue(res.contains("markup://fake:event"));
}