@Test public void shouldSetMovedPermanentlyStatusOfLogic() throws Exception { when(config.getApplicationPath()).thenReturn("http: 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: }
public void movedPermanentlyTo(String location) { this.response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); header("Location", fixLocation(location)); this.response.addIntHeader("Content-length", 0); this.response.addDateHeader("Date", System.currentTimeMillis()); }
DefaultStatus implements Status { public void movedPermanentlyTo(String location) { this.response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); header("Location", fixLocation(location)); this.response.addIntHeader("Content-length", 0); this.response.addDateHeader("Date", System.currentTimeMillis()); } }
DefaultStatus implements Status { public void movedPermanentlyTo(String location) { this.response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); header("Location", fixLocation(location)); this.response.addIntHeader("Content-length", 0); this.response.addDateHeader("Date", System.currentTimeMillis()); } DefaultStatus(HttpServletResponse response, Result result, Configuration config,
			Proxifier proxifier, Router router); }
DefaultStatus implements Status { public void movedPermanentlyTo(String location) { this.response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); header("Location", fixLocation(location)); this.response.addIntHeader("Content-length", 0); this.response.addDateHeader("Date", System.currentTimeMillis()); } DefaultStatus(HttpServletResponse response, Result result, Configuration config,
			Proxifier proxifier, Router router); void notFound(); void header(String key, String value); void created(); void created(String location); void ok(); void conflict(); void methodNotAllowed(EnumSet<HttpMethod> allowedMethods); void movedPermanentlyTo(String location); T movedPermanentlyTo(final Class<T> controller); void unsupportedMediaType(String message); void badRequest(String message); void badRequest(List<?> errors); void forbidden(String message); void noContent(); void notAcceptable(); void accepted(); void notModified(); }
DefaultStatus implements Status { public void movedPermanentlyTo(String location) { this.response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); header("Location", fixLocation(location)); this.response.addIntHeader("Content-length", 0); this.response.addDateHeader("Date", System.currentTimeMillis()); } DefaultStatus(HttpServletResponse response, Result result, Configuration config,
			Proxifier proxifier, Router router); void notFound(); void header(String key, String value); void created(); void created(String location); void ok(); void conflict(); void methodNotAllowed(EnumSet<HttpMethod> allowedMethods); void movedPermanentlyTo(String location); T movedPermanentlyTo(final Class<T> controller); void unsupportedMediaType(String message); void badRequest(String message); void badRequest(List<?> errors); void forbidden(String message); void noContent(); void notAcceptable(); void accepted(); void notModified();  }