SimpleApplicationWrapper implements ApplicationWrapper { @Deactivate protected void stop() { LOG.trace("Stopping \"" + applicationId + "\" application..."); try (RepositoryConnection conn = repository.getConnection()) { conn.remove(factory.createIRI(NAMESPACE + applicationId), null, null); } LOG.debug("Application \"" + applicationId + "\" stopped."); }  @Override void validateConfig(Map<String, Object> props); @Override String getId(); @Override Application getApplication();  }
@Test public void stopTest() throws Exception { wrapper.applicationId = "id"; RepositoryConnection conn = repo.getConnection(); conn.add(VALUE_FACTORY.createIRI(namespace + "id"), VALUE_FACTORY.createIRI(RDF.TYPE.stringValue()), VALUE_FACTORY.createIRI(Application.TYPE)); wrapper.stop(); assertFalse(conn.getStatements(VALUE_FACTORY.createIRI(namespace + "id"), null, null).hasNext()); conn.close(); }