use of edu.cornell.kfs.pdp.batch.fixture.ACHPersonPayeeFixture in project cu-kfs by CU-CommunityApps.
the class PayeeACHAccountExtractServiceImplTest method createMockPersonService.
private PersonService createMockPersonService() throws Exception {
PersonService personService = mock(PersonService.class);
Stream<ACHPersonPayeeFixture> fixtures = Stream.of(ACHPersonPayeeFixture.JOHN_DOE, ACHPersonPayeeFixture.JANE_DOE, ACHPersonPayeeFixture.ROBERT_SMITH, ACHPersonPayeeFixture.MARY_SMITH, ACHPersonPayeeFixture.KFS_SYSTEM_USER);
fixtures.forEach((fixture) -> {
when(personService.getPersonByPrincipalName(fixture.principalName)).thenReturn(fixture.toPerson());
});
return personService;
}
Aggregations