ConnectionWrapper implements Wrapper { public <T> boolean contains(Object identifier, Class<T> cls, Descriptor descriptor) { final URI idUri = getIdentifierAsUri(identifier); return idUri != null && mapper.containsEntity(cls, idUri, descriptor); } ConnectionWrapper(Connection connection); boolean contains(Object identifier, Class<T> cls, Descriptor descriptor); T find(LoadingParameters<T> loadingParameters); T getReference(LoadingParameters<T> loadingParameters); void merge(T entity, Field field, Descriptor descriptor); void persist(Object identifier, T entity, Descriptor descriptor); void remove(Object identifier, Class<T> cls, Descriptor descriptor); void loadFieldValue(T entity, Field field, Descriptor descriptor); void commit(); void rollback(); void close(); boolean isConsistent(URI context); List<URI> getContexts(); Statement createStatement(); @Override T unwrap(Class<T> cls);  }
@Test void containsReturnsFalseForNullIdentifier() { final boolean res = connectionWrapper.contains(null, OWLClassA.class, new EntityDescriptor()); assertFalse(res); verify(oomMock, never()).containsEntity(any(), any(), any()); }