public void returnSameInstanceOnGetByCriteria() {
final String id = createFakeAggregate("plop");
final Criteria criteria = session.createCriteria(FakeAggregate.class);
final FakeAggregate instanceById = session.get(id, FakeAggregate.class);
final FakeAggregate instanceByCriteria = (FakeAggregate) criteria.list().get(0);
assertThat(instanceById, sameInstance(instanceByCriteria));
}
@Test