You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* `number_service()` returns 300 numbers, but you only need 100 numbers, from the middle.
*/
@Test
public void golden_middle() {
Flux<Integer> numbers = number_service()
.skip(100) //this should be .skip(150) as 300/2 = 150
.take(100)
;
StepVerifier.create(numbers)
.expectNextMatches(i -> i >= 100) // this should be expectNextMatches(i -> i >= 100), as the middle number is 150
.expectNextCount(99)
.verifyComplete();
}
The text was updated successfully, but these errors were encountered:
Test and solution are correct, but the phrasing could have been clearer. The task is to take 100 numbers such that the middle of the taken interval is the middle of the entire 300 numbers. I.e. take numbers 101 to 200.
In the solution:
The text was updated successfully, but these errors were encountered: