@Test void testEventIsPublishedThroughoutHierarchy() { AggregateModel<SomeSubclass> inspector = AnnotatedAggregateMetaModelFactory.inspectAggregate(SomeSubclass.class); AtomicLong payload = new AtomicLong(); inspector.publish(new GenericEventMessage<>(payload), new SomeSubclass()); assertEquals(2L, payload.get()); }
public static <T> AggregateModel<T> inspectAggregate(Class<T> aggregateType) { return new AnnotatedAggregateMetaModelFactory().createModel(aggregateType); }
AnnotatedAggregateMetaModelFactory implements AggregateMetaModelFactory { public static <T> AggregateModel<T> inspectAggregate(Class<T> aggregateType) { return new AnnotatedAggregateMetaModelFactory().createModel(aggregateType); } }
AnnotatedAggregateMetaModelFactory implements AggregateMetaModelFactory { public static <T> AggregateModel<T> inspectAggregate(Class<T> aggregateType) { return new AnnotatedAggregateMetaModelFactory().createModel(aggregateType); } AnnotatedAggregateMetaModelFactory();  AnnotatedAggregateMetaModelFactory(ParameterResolverFactory parameterResolverFactory);  AnnotatedAggregateMetaModelFactory(ParameterResolverFactory parameterResolverFactory,
                                              HandlerDefinition handlerDefinition); }
AnnotatedAggregateMetaModelFactory implements AggregateMetaModelFactory { public static <T> AggregateModel<T> inspectAggregate(Class<T> aggregateType) { return new AnnotatedAggregateMetaModelFactory().createModel(aggregateType); } AnnotatedAggregateMetaModelFactory();  AnnotatedAggregateMetaModelFactory(ParameterResolverFactory parameterResolverFactory);  AnnotatedAggregateMetaModelFactory(ParameterResolverFactory parameterResolverFactory,
                                              HandlerDefinition handlerDefinition); static AggregateModel<T> inspectAggregate(Class<T> aggregateType); static AggregateModel<T> inspectAggregate(Class<T> aggregateType, Set<Class<? extends T>> subtypes); static AggregateModel<T> inspectAggregate(Class<T> aggregateType,
                                                         ParameterResolverFactory parameterResolverFactory); static AggregateModel<T> inspectAggregate(Class<T> aggregateType,
                                                         ParameterResolverFactory parameterResolverFactory,
                                                         HandlerDefinition handlerDefinition); static AggregateModel<T> inspectAggregate(Class<T> aggregateType,
                                                         ParameterResolverFactory parameterResolverFactory,
                                                         HandlerDefinition handlerDefinition,
                                                         Set<Class<? extends T>> subtypes); @Override AnnotatedAggregateModel<T> createModel(Class<? extends T> aggregateType,
                                                      Set<Class<? extends T>> subtypes); }
AnnotatedAggregateMetaModelFactory implements AggregateMetaModelFactory { public static <T> AggregateModel<T> inspectAggregate(Class<T> aggregateType) { return new AnnotatedAggregateMetaModelFactory().createModel(aggregateType); } AnnotatedAggregateMetaModelFactory();  AnnotatedAggregateMetaModelFactory(ParameterResolverFactory parameterResolverFactory);  AnnotatedAggregateMetaModelFactory(ParameterResolverFactory parameterResolverFactory,
                                              HandlerDefinition handlerDefinition); static AggregateModel<T> inspectAggregate(Class<T> aggregateType); static AggregateModel<T> inspectAggregate(Class<T> aggregateType, Set<Class<? extends T>> subtypes); static AggregateModel<T> inspectAggregate(Class<T> aggregateType,
                                                         ParameterResolverFactory parameterResolverFactory); static AggregateModel<T> inspectAggregate(Class<T> aggregateType,
                                                         ParameterResolverFactory parameterResolverFactory,
                                                         HandlerDefinition handlerDefinition); static AggregateModel<T> inspectAggregate(Class<T> aggregateType,
                                                         ParameterResolverFactory parameterResolverFactory,
                                                         HandlerDefinition handlerDefinition,
                                                         Set<Class<? extends T>> subtypes); @Override AnnotatedAggregateModel<T> createModel(Class<? extends T> aggregateType,
                                                      Set<Class<? extends T>> subtypes);  }