How can be stub out the SORT.BY parameter in when() and verify() calls?

28 views
Skip to first unread message

udemy course

unread,
Aug 28, 2023, 7:27:11 AM8/28/23
to mockito

How do i stub out the below line of code.

List<Workout> workoutList = workoutRepo.findByUserId(userId,Sort.by(new Sort.Order(Direction.DESC, "date"), new Sort.Order(Direction.DESC, "startTime")));

i am unsure how to handle the SORT parameter.

when(workoutRepo.findByUserId(1,     ) ).thenReturn(new ArrayList<>());

Reply all
Reply to author
Forward
0 new messages