@Test public void testProcess_withRelativePath() throws Exception { mockery.checking( new Expectations() { { one(response).sendRedirect("resource"); } }); uriProcessor.process(new URI("resource"), routingContext, handlerDescriptor); }
@Test public void testProcess_withAbsolutePath() throws Exception { mockery.checking( new Expectations() { { allowing(request).getContextPath(); will(returnValue("/context")); one(response).sendRedirect("/context/resource"); } }); uriProcessor.process(new URI("/resource"), routingContext, handlerDescriptor); }
@Test public void testCanProcessResults() throws Exception { assertTrue( uriProcessor.canProcessResult(new URI("/something"), routingContext, handlerDescriptor)); assertFalse(uriProcessor.canProcessResult(new Object(), routingContext, handlerDescriptor)); }