ResponseEntityBuilder { public static <T> ResponseEntity<T> ok() { return ok(null); } private  ResponseEntityBuilder(); static ResponseEntity<T> created(); static ResponseEntity<T> created(final String location); static ResponseEntity<T> created(final String location, final boolean noContent); static ResponseEntity<T> created(final boolean noContent, final String uriTemplate,
            final String... keyValues); static ResponseEntity<T> ok(); static ResponseEntity<T> ok(final T response); static ResponseEntity<Void> noContent(); static ResponseEntity<T> notFound(); static ResponseEntity<Void> unprocessable();  }
@Test public void testOk() { ResponseEntity<Object> ok = ResponseEntityBuilder.ok(); Assert.assertNotNull(ok); Assert.assertNull(ok.getBody()); Assert.assertEquals(ok.getStatusCode(), HttpStatus.OK); }
@Test public void testOkWithContent() { String content = "PredixRocks"; ResponseEntity<String> ok = ResponseEntityBuilder.ok(content); Assert.assertNotNull(ok); Assert.assertEquals(ok.getStatusCode(), HttpStatus.OK); Assert.assertEquals(ok.getBody(), "PredixRocks"); }