Merge pull request #1286 from felipe-gdr/master

BAEL-632 refactor: Use 'of' instead of Stream 'builder'
This commit is contained in:
pedja4 2017-03-03 06:39:34 +01:00 committed by GitHub
commit e109c5a604
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ public class CustomAnswerWithLambdaUnitTest {
MockitoAnnotations.initMocks(this);
when(jobService.listJobs(any(Person.class))).then((i) -> {
return ((Person) i.getArgument(0)).getName().equals("Peter") ? Stream.<JobPosition> builder().add(new JobPosition("Teacher")).build() : Stream.empty();
return ((Person) i.getArgument(0)).getName().equals("Peter") ? Stream.of(new JobPosition("Teacher")) : Stream.empty();
});
}
}