ResourceResource { private Response<Void> deleteResource(String id) { try { storage.deleteResource(id); } catch (IOException e) { throw new RuntimeException(e); } return Response.forStatus(Status.NO_CONTENT); } ResourceResource(Storage storage); Stream<Route<AsyncHandler<Response<ByteString>>>> routes();  }
@Test public void shouldFailToDeleteResource() throws Exception { sinceVersion(Api.Version.V3); doThrow(new IOException()).when(storage).deleteResource(anyString()); Response<ByteString> response = awaitResponse(serviceHelper.request("DELETE", path("/resource1"))); assertThat(response, hasStatus(belongsToFamily(StatusType.Family.SERVER_ERROR))); }