### Question:
VirtuosoRepositoryConnection implements RDFConnection { @Override public boolean exists(ID subject, UID predicate, NODE object, UID context, boolean includeInferred) { STMTIterator stmts = findStatements(subject, predicate, object, context, includeInferred, true); try { return stmts.hasNext(); } finally { stmts.close(); } } protected  VirtuosoRepositoryConnection(
            IdSequence idSequence,
            Converter converter,
            int prefetchSize,
            UID defGraph,
            Collection<UID> allowedGraphs,
            Connection connection); static void bindBlankNode(PreparedStatement ps, int col, BID n); static void bindResource(PreparedStatement ps, int col, ID n); static void bindURI(PreparedStatement ps, int col, UID n); static void bindValue(PreparedStatement ps, int col, NODE n); void addBulk(Collection<STMT> addedStatements); void removeBulk(Collection<STMT> deletedStatements); @Override RDFBeanTransaction beginTransaction(boolean readOnly, int txTimeout, int isolationLevel); @Override void clear(); @Override void close(); @Override BID createBNode(); @SuppressWarnings("unchecked") @Override Q createUpdate(UpdateLanguage<D, Q> updateLanguage, final D definition); @SuppressWarnings("unchecked") @Override Q createQuery(QueryLanguage<D, Q> queryLanguage, D definition); @Override boolean exists(ID subject, UID predicate, NODE object, UID context, boolean includeInferred); @Override CloseableIterator<STMT> findStatements(
            @Nullable ID subject,
            @Nullable UID predicate,
            @Nullable NODE object,
            @Nullable UID context, boolean includeInferred); Connection getConnection(); @Override long getNextLocalId(); boolean isReadOnly(); void load(Format format, InputStream is, @Nullable UID context, boolean replace); @Override void remove(ID subject, UID predicate, NODE object, UID context); @Override void update(Collection<STMT> removedStatements, Collection<STMT> addedStatements); T doInConnection(SQLConnectionCallback<T> callback); @Override QueryOptions getQueryOptions(); @Override InferenceOptions getInferenceOptions();  }### Answer:
@Test public void Exists() { ID sub = new UID(TEST.NS, "e" + System.currentTimeMillis()); ID type = new UID(TEST.NS, "TestType" + System.currentTimeMillis()); assertNotExists(sub, null, null, null); repository.execute(new Addition(new STMT(sub, RDF.type, type))); toBeRemoved = Collections.singleton(new STMT(sub, RDF.type, type)); assertExists(new STMT(sub, RDF.type, type)); }