use of org.zalando.nakadi.view.CursorCommitResult in project nakadi by zalando.
the class CursorsControllerTest method whenCommitInvalidCursorsThenOk.
@Test
public void whenCommitInvalidCursorsThenOk() throws Exception {
when(cursorsService.commitCursors(any(), any(), any())).thenReturn(DUMMY_CURSORS.stream().map(v -> Boolean.FALSE).collect(Collectors.toList()));
final ItemsWrapper<CursorCommitResult> expectation = new ItemsWrapper<>(DUMMY_CURSORS.stream().map(c -> new CursorCommitResult(c, false)).collect(Collectors.toList()));
postCursors(DUMMY_CURSORS).andExpect(status().isOk()).andExpect(content().string(TestUtils.JSON_TEST_HELPER.matchesObject(expectation)));
}
Aggregations