DefaultHttpResult implements HttpResult { public void setStatusCode(int statusCode) { response.setStatus(statusCode); } DefaultHttpResult(HttpServletResponse response, Status status); HttpResult addDateHeader(String name, long date); HttpResult addHeader(String name, String value); HttpResult addIntHeader(String name, int value); void sendError(int statusCode); void sendError(int statusCode, String message); void setStatusCode(int statusCode); void movedPermanentlyTo(String uri); T movedPermanentlyTo(final Class<T> controller); HttpResult body(String body); HttpResult body(InputStream body); HttpResult body(Reader body);  }
@Test public void shouldSetStatusCode() throws Exception { httpResult.setStatusCode(SC_INTERNAL_SERVER_ERROR); verify(response).setStatus(SC_INTERNAL_SERVER_ERROR); }