DatabaseConnector extends StdCouchDbConnector { public <T> T get(Class<T> type, String id) { try { return super.get(type, id); } catch (DocumentNotFoundException e) { log.info("Document not found for ID: " + id); return null; } catch (DbAccessException e) { log.error("Document ID " + id + " could not be successfully converted to " + type.getName(), e); return null; } } DatabaseConnector(HttpClient httpClient, String dbName);  DatabaseConnector(Supplier<HttpClient> httpClient, String dbName);  DatabaseConnector(HttpClient httpClient, String dbName, MapperFactory mapperFactory); private  DatabaseConnector(String dbName, DatabaseInstance instance, MapperFactory mapperFactory); Optional<Status> restrictAccessToAdmins(); boolean add(T document); T get(Class<T> type, String id); List<T> get(Class<T> type, Collection<String> ids, boolean ignoreNotFound); List<T> get(Class<T> type, Collection<String> ids); @Override void update(Object document); boolean contains(String id); boolean deleteById(String id); String getDbName(); DatabaseInstance getInstance(); List<DocumentOperationResult> deleteIds(Collection<String> ids, Class<T> type);  }
@Test public void testGetDocument() throws Exception { TestObject object1 = connector.get(TestObject.class, id); assertEquals(object, object1); }