@Test void testInspectSaga() { SagaModel<MySaga> sagaModel = testSubject.modelOf(MySaga.class); Optional<AssociationValue> actual = sagaModel.resolveAssociation(asEventMessage(new MySagaStartEvent("value"))); assertTrue(actual.isPresent()); assertEquals("value", actual.get().getValue()); assertEquals("property", actual.get().getKey()); }
@SuppressWarnings("unchecked") @Override public <T> SagaModel<T> modelOf(Class<T> sagaType) { return (SagaModel<T>) registry.computeIfAbsent(sagaType, this::doCreateModel); }
AnnotationSagaMetaModelFactory implements SagaMetaModelFactory { @SuppressWarnings("unchecked") @Override public <T> SagaModel<T> modelOf(Class<T> sagaType) { return (SagaModel<T>) registry.computeIfAbsent(sagaType, this::doCreateModel); } }
AnnotationSagaMetaModelFactory implements SagaMetaModelFactory { @SuppressWarnings("unchecked") @Override public <T> SagaModel<T> modelOf(Class<T> sagaType) { return (SagaModel<T>) registry.computeIfAbsent(sagaType, this::doCreateModel); } AnnotationSagaMetaModelFactory();  AnnotationSagaMetaModelFactory(ParameterResolverFactory parameterResolverFactory);  AnnotationSagaMetaModelFactory(ParameterResolverFactory parameterResolverFactory,
                                          HandlerDefinition handlerDefinition); }
AnnotationSagaMetaModelFactory implements SagaMetaModelFactory { @SuppressWarnings("unchecked") @Override public <T> SagaModel<T> modelOf(Class<T> sagaType) { return (SagaModel<T>) registry.computeIfAbsent(sagaType, this::doCreateModel); } AnnotationSagaMetaModelFactory();  AnnotationSagaMetaModelFactory(ParameterResolverFactory parameterResolverFactory);  AnnotationSagaMetaModelFactory(ParameterResolverFactory parameterResolverFactory,
                                          HandlerDefinition handlerDefinition); @SuppressWarnings("unchecked") @Override SagaModel<T> modelOf(Class<T> sagaType); }
AnnotationSagaMetaModelFactory implements SagaMetaModelFactory { @SuppressWarnings("unchecked") @Override public <T> SagaModel<T> modelOf(Class<T> sagaType) { return (SagaModel<T>) registry.computeIfAbsent(sagaType, this::doCreateModel); } AnnotationSagaMetaModelFactory();  AnnotationSagaMetaModelFactory(ParameterResolverFactory parameterResolverFactory);  AnnotationSagaMetaModelFactory(ParameterResolverFactory parameterResolverFactory,
                                          HandlerDefinition handlerDefinition); @SuppressWarnings("unchecked") @Override SagaModel<T> modelOf(Class<T> sagaType);  }