ServletRuntime { @Deprecated abstract boolean isAsyncDispatch(HttpServletRequest request);    }
@Test public void servlet2_isAsyncDispatch_should_return_false() { Servlet2Runtime implSpy = spy(servlet2Runtime); boolean result = implSpy.isAsyncDispatch(requestMock); assertThat(result).isFalse(); verify(implSpy).isAsyncDispatch(requestMock); verifyNoMoreInteractions(implSpy); }
@DataProvider(value = { "FORWARD | false", "INCLUDE | false", "REQUEST | false", "ASYNC | true", "ERROR | false" }, splitBy = "\\|") @Test public void servlet3_isAsyncDispatch_returns_result_based_on_request_dispatcher_type( DispatcherType dispatcherType, boolean expectedResult ) { doReturn(dispatcherType).when(requestMock).getDispatcherType(); boolean result = servlet3Runtime.isAsyncDispatch(requestMock); assertThat(result).isEqualTo(expectedResult); }