Map<String, RegisterEventDef> eventDefs = new HashMap<>();
RegisterEventDefImpl.Builder regBuilder = new RegisterEventDefImpl.Builder();
regBuilder.setDescriptor(DefDescriptorImpl.getInstance("test:anevent", EventDef.class));
regBuilder.setAttName("fakey");
regBuilder.setAccess(new DefinitionAccessImpl(null, "public"));
eventDefs.put("fakey", regBuilder.build());
ComponentDefImpl.Builder builder = createAbstractBuilder();
builder.events = eventDefs;
ComponentDef cmp = builder.build();