}
@Test
@Transactional
public void testUpdateSingleRelatedToViaField() {
Group group = persist(new Group());
group.setMentorship(new Mentorship(persist(new Person()),group));
persist(group);
final Long firstMentorshipId = group.getMentorship().getId();
final Person mentor2 = new Person();
group.setMentorship(new Mentorship(persist(mentor2),group));
persist(group);
final Node node = neo4jTemplate.getPersistentState(group);
assertEquals(1,IteratorUtil.count(node.getRelationships(Direction.INCOMING,DynamicRelationshipType.withName("mentors"))));
final Group loaded = neo4jTemplate.load(node, Group.class);