identifier, new AssociationValue("key", "value")));
entityManager.flush();
entityManager.clear();
Set<String> loaded = repository.find(StubSaga.class, new AssociationValue("key", "value"));
assertEquals(1, loaded.size());
Saga loadedSaga = repository.load(loaded.iterator().next());
assertEquals(identifier, loadedSaga.getSagaIdentifier());
assertNotSame(loadedSaga, saga);
assertNotNull(entityManager.find(SagaEntry.class, identifier));
}