ServletRuntime { abstract boolean isAsyncRequest(HttpServletRequest request);    }
@Test public void servlet2_isAsyncRequest_should_return_false() { Servlet2Runtime implSpy = spy(servlet2Runtime); boolean result = implSpy.isAsyncRequest(requestMock); assertThat(result).isFalse(); verify(implSpy).isAsyncRequest(requestMock); verifyNoMoreInteractions(implSpy); }
@DataProvider(value = { "true", "false" }, splitBy = "\\|") @Test public void isAsyncRequest_should_return_the_value_of_request_isAsyncStarted(boolean requestIsAsyncStarted) { Servlet3Runtime implSpy = spy(servlet3Runtime); doReturn(requestIsAsyncStarted).when(requestMock).isAsyncStarted(); boolean result = implSpy.isAsyncRequest(requestMock); assertThat(result).isEqualTo(requestIsAsyncStarted); verify(requestMock).isAsyncStarted(); verify(implSpy).isAsyncRequest(requestMock); verifyNoMoreInteractions(implSpy); }