ServiceResource { @GET @Path("/ping") public Response ping() { return storage.isAvailable() ? ok() : serviceUnavailable(); } @Autowired  ServiceResource(Storage storage, OperationsRegistry operationsRegistry); @GET @Path("/ping") Response ping(); @GET @Path("/version") @Produces(TEXT_PLAIN) String getServerVersion(); @GET @Path("/operations") @Produces(APPLICATION_JSON) Response getSupportedOperations();  }
@Test public void testPing() throws Exception { Response<ResponseBody> response = getApi().ping().execute(); assertThat(response.isSuccessful(), is(true)); }