Merge pull request #1286 from felipe-gdr/master
BAEL-632 refactor: Use 'of' instead of Stream 'builder'
This commit is contained in:
commit
e109c5a604
|
@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue