### Question:
ResourceControllerService implements Service { public void deleteResource(Resource resource, WriteSessionConfiguration configuration) throws FeatureException { adapter(resource, configuration).delete(); } private  ResourceControllerService(WriteSessionService writeSessionService, TemplateManagementService templateManagementService); DataSet getResource(Resource resource, WriteSessionConfiguration configuration); DataSet queryResource(Resource resource, Query query, WriteSessionConfiguration configuration); void updateResource(Resource resource, DataSet dataSet, WriteSessionConfiguration configuration); void deleteResource(Resource resource, WriteSessionConfiguration configuration); Resource createResource(Container container, DataSet dataSet, WriteSessionConfiguration configuration); static ServiceBuilder<ResourceControllerService> serviceBuilder(); static ResourceControllerService defaultService();  }### Answer:
@Test public void testDeleteResource() throws Exception { String resourcePath = "delete"; final Name<?> resourceName = name(resourcePath); final DataSet initial = getInitialData(newReference().toLocalIndividual().named("Miguel"), new Date()); final Resource resource = publishResource(Resource.class,PersonHandler.ID, resourceName, resourcePath); final PersonHandler handler = getHandler(PersonHandler.class); handler.add(resourceName, initial); transactional( new Callable<Void>() { @Override public Void call() throws Exception { DataSet data = sut.getResource(resource,getSessionConfiguration(resource)); assertThat(data,sameInstance(initial)); return null; } } ); transactional( new Callable<Void>() { @Override public Void call() throws Exception { sut.deleteResource(resource,getSessionConfiguration(resource)); assertThat(handler.hasResource(resourceName),equalTo(false)); return null; } } ); }