@Test
public void returnsResponseWithStatus_NOT_FOUND_WhenRootResourceNotFound() throws Exception {

    when(applicationContext.getPathSegments(false)).thenReturn(createPathSegments("a", "b;x=y"));
    requestDispatcher.dispatch(request, response);
    ArgumentCaptor<Response> argumentCaptor = ArgumentCaptor.forClass(Response.class);
    verify(response).setResponse(argumentCaptor.capture());
    assertEquals(NOT_FOUND, argumentCaptor.getValue().getStatusInfo());
}