@DirtiesContext
@Test
public void testLoadSagaOfDifferentTypesWithSameAssociationValue_SagaFound() {
StubSaga testSaga = new StubSaga("test1");
MyOtherTestSaga otherTestSaga = new MyOtherTestSaga("test2");
testSaga.registerAssociationValue(new AssociationValue("key", "value"));
otherTestSaga.registerAssociationValue(new AssociationValue("key", "value"));
repository.add(testSaga);
repository.add(otherTestSaga);
entityManager.flush();
entityManager.clear();
Set<String> actual = repository.find(StubSaga.class, new AssociationValue("key", "value"));
assertEquals(1, actual.size());
assertEquals("test1", actual.iterator().next());
}