@Test
public void shouldSetMovedPermanentlyStatusOfLogic() throws Exception {

	when(config.getApplicationPath()).thenReturn("http://myapp.com");
	Method method = Resource.class.getDeclaredMethod("method");
when(router.urlFor(eq(Resource.class), eq(method), Mockito.anyVararg())).thenReturn("/resource/method");
	status.movedPermanentlyTo(Resource.class).method();
	verify(response).setStatus(301);
	verify(response).addHeader("Location", "http://myapp.com/resource/method");
}