@Test public void testTargetEntity() { Relationship rel = new MockRelationship(); Entity tstEntity = new MockEntity(); tstEntity.setName("abc"); rel.setTargetEntityName(tstEntity); assertSame("abc", rel.getTargetEntityName()); }