ResponseEntityBuilder { public static ResponseEntity<Void> noContent() { return new ResponseEntity<>(HttpStatus.NO_CONTENT); } 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 testDeleted() { ResponseEntity<Void> deleted = ResponseEntityBuilder.noContent(); Assert.assertNotNull(deleted); Assert.assertNull(deleted.getBody()); Assert.assertEquals(deleted.getStatusCode(), HttpStatus.NO_CONTENT); }