@Test
public void shouldIgnoreAdditionalPropertiesInEventBatchInAnyOrder() throws IOException, InterruptedException, BackoffException, EventAlreadyProcessedException {

    final Response response = mock(Response.class);
    final ByteArrayInputStream initialInputStream = new ByteArrayInputStream("{\"foo\":\"bar\",\"cursor\":{\"partition\":\"123\",\"offset\":\"456\"},\"events\":[{\"id\":\"789\"}],\"baz\":123}".getBytes("utf-8"));
    final ByteArrayInputStream emptyInputStream = new ByteArrayInputStream(new byte[0]);
    when(response.getBody()).thenReturn(initialInputStream, emptyInputStream);
    final Request request = mock(Request.class);
    when(request.execute()).thenReturn(response);
    when(RequestFactory.createRequest(uri, "GET")).thenReturn(request);
    final NoBackoffStrategy backoffStrategy = new NoBackoffStrategy();
    final NakadiReader<SomeEvent> nakadiReader = new NakadiReader<>(uri, RequestFactory, backoffStrategy, cursorManager, objectMapper, Collections.singleton(EVENT_NAME), Optional.empty(), Optional.empty(), SomeEvent.class, listener);
    expectedException.expect(BackoffException.class);
    expectedException.expect(ComposeMatchers.hasFeature(BackoffException::getRetries, equalTo(0)));
    expectedException.expectCause(instanceOf(IOException.class));
    expectedException.expectCause(ComposeMatchers.hasFeature("message", Exception::getMessage, Matchers.containsString("Stream was closed")));
    nakadiReader.runInternal();
}