@Test
public void whenRefererDontMatchAControllerShouldForwardToPage() throws Exception {

	PageResult page = mock(PageResult.class);
	
	when(request.getHeader("Referer")).thenReturn("http://localhost:8080/vraptor/no-controller");
	when(request.getContextPath()).thenReturn("/vraptor");
	when(router.parse("/no-controller", HttpMethod.GET, request)).thenThrow(new ResourceNotFoundException());
	doReturn(page).when(result).use(page());
	refererResult.forward();
	
	verify(page).forwardTo("/no-controller");
}