}
}
@Test
public void shouldFailOnNonExistingAggregateRoot() {
VersionedId id = VersionedId.random();
try {
subject.getByVersionedId(FakeAggregateRoot.class, id);
fail("AggregateRootNotFoundException expected");
} catch (AggregateRootNotFoundException expected) {
assertEquals(FakeAggregateRoot.class.getName(), expected.getAggregateRootType());
assertEquals(id.getId(), expected.getAggregateRootId());
}
}