@Test
@Transactional // DATAGRAPH-298
public void testConcreteEntityLoadedThroughAbstractRepoLoadsCorrectType() {
Concrete1NodeEntity origConcrete1 = new Concrete1NodeEntity("concrete1A");
Concrete2NodeEntity origConcrete2 = new Concrete2NodeEntity("concrete2A");
abstractNodeEntityRepository.save(origConcrete1);
abstractNodeEntityRepository.save(origConcrete2);
Concrete1NodeEntity loadedConcrete1 = (Concrete1NodeEntity)abstractNodeEntityRepository.findOne(origConcrete1.id);
assertNotNull(loadedConcrete1);
assertThat(loadedConcrete1, is(origConcrete1));
Concrete2NodeEntity loadedConcrete2 = (Concrete2NodeEntity)abstractNodeEntityRepository.findOne(origConcrete2.id);
assertNotNull(loadedConcrete2);