### Question:
ActorRelationServiceImpl extends DefaultCrudService<ActorRelation> implements ActorRelationService { public ActorRelation load(Integer type, Long masterId, Long followerId) { return this.actorRelationDao.load(type, masterId, followerId); }  @Autowired void setActorRelationDao(ActorRelationDao actorRelationDao); List<ActorRelation> findByMaster(Integer type, Long masterId); ActorRelation load(Integer type, Long masterId, Long followerId); List<ActorRelation> findByFollower(Integer type, Long followerId);  }### Answer:
@Test public void testLoad() { ActorRelation ar1 = saveOne(); ActorRelation ar2 = actorRelationService.load(ar1.getType(), ar1 .getMaster().getId(), ar1.getFollower().getId()); Assert.assertNotNull(ar2); Assert.assertEquals(ar1, ar2); }
@Test public void testLoadByPK() { ActorRelation ar = saveOne(); Long mid = ar.getMaster().getId(); Long fid = ar.getFollower().getId(); Integer type = ar.getType(); String order = ar.getOrderNo(); ActorRelationPK id = new ActorRelationPK(ar.getMaster(), ar.getFollower(), ar.getType()); ar = actorRelationService.load(id); Assert.assertNotNull(ar); Assert.assertEquals(mid, ar.getMaster().getId()); Assert.assertEquals(fid, ar.getFollower().getId()); Assert.assertEquals(type, ar.getType()); Assert.assertEquals(order, ar.getOrderNo()); }