@Test public void findEntity() { context.checking(new Expectations() { { oneOf(user).getAccountId(); will(returnValue("joe")); oneOf(mapper).findByAccountId("joe"); } }); sut.findEntity(user, 3L); context.assertIsSatisfied(); }
public Person findEntity(final Principal user, final String id) { return personMapper.findByAccountId(user.getAccountId()); }
PersonFinder implements EntityFinder<Person> { public Person findEntity(final Principal user, final String id) { return personMapper.findByAccountId(user.getAccountId()); } }
PersonFinder implements EntityFinder<Person> { public Person findEntity(final Principal user, final String id) { return personMapper.findByAccountId(user.getAccountId()); } PersonFinder(final PersonMapper inMapper); }
PersonFinder implements EntityFinder<Person> { public Person findEntity(final Principal user, final String id) { return personMapper.findByAccountId(user.getAccountId()); } PersonFinder(final PersonMapper inMapper); Person findEntity(final Principal user, final String id); Person findEntity(final Principal user, final Long id); }
PersonFinder implements EntityFinder<Person> { public Person findEntity(final Principal user, final String id) { return personMapper.findByAccountId(user.getAccountId()); } PersonFinder(final PersonMapper inMapper); Person findEntity(final Principal user, final String id); Person findEntity(final Principal user, final Long id);  }