SimpleStateManager implements StateManager { @Override public boolean stateExists(Resource stateId) { try (RepositoryConnection conn = repository.getConnection()) { return stateExists(stateId, conn); } }  @Override boolean stateExists(Resource stateId); @Override boolean stateExistsForUser(Resource stateId, String username); @Override Map<Resource, Model> getStates(@Nullable String username, @Nullable String applicationId,
                                          Set<Resource> subjects); @Override Resource storeState(Model newState, String username); @Override Resource storeState(Model newState, String username, String applicationId); @Override Model getState(Resource stateId); @Override void updateState(Resource stateId, Model newState); @Override void deleteState(Resource stateId);  }
@Test public void stateExistsTest() throws Exception { RepositoryConnection conn = repo.getConnection(); conn.add(VALUE_FACTORY.createIRI("http: conn.add(VALUE_FACTORY.createIRI("http: assertTrue(manager.stateExists(VALUE_FACTORY.createIRI("http: assertFalse(manager.stateExists(VALUE_FACTORY.createIRI("http: assertFalse(manager.stateExists(VALUE_FACTORY.createIRI("http: conn.close(); }