### Question:
StdCouchDbInstance implements CouchDbInstance { public List<String> getAllDatabases() { return restTemplate.get("/_all_dbs", new StdResponseHandler<List<String>>(){ @Override public List<String> success(HttpResponse hr) throws Exception { return objectMapper.readValue(hr.getContent(), STRING_LIST_TYPE_DEF); } }); } StdCouchDbInstance(HttpClient client);  StdCouchDbInstance(HttpClient client, ObjectMapperFactory of); ObjectMapperFactory getObjectMapperFactory(); void createDatabase(String path); void createDatabase(DbPath db); boolean createDatabaseIfNotExists(String path); boolean createDatabaseIfNotExists(final DbPath db); void deleteDatabase(String path); @Override boolean checkIfDbExists(String path); @Override boolean checkIfDbExists(DbPath db); List<String> getAllDatabases(); ReplicationStatus replicate(ReplicationCommand cmd); HttpClient getConnection(); CouchDbConnector createConnector(String path,
			boolean createIfNotExists); @Override CouchDbConnector getReplicatorConnector(); @Override T getConfiguration(final Class<T> c); @Override T getConfiguration(final Class<T> c, String section); @Override T getConfiguration(final Class<T> c, String section, String key); @Override String getConfiguration(String section, String key); @Override String setConfiguration(String section, String key, String value); @Override String deleteConfiguration(String section, String key); @Override Collection<ActiveTask> getActiveTasks();  }### Answer:
@Test public void testGetAllDatabases() { when(client.get("/_all_dbs")).thenReturn(HttpResponseStub.valueOf(200, "[\"somedatabase\", \"anotherdatabase\"]")); List<String> all = instance.getAllDatabases(); assertEquals(2, all.size()); assertEquals("somedatabase", all.get(0)); assertEquals("anotherdatabase", all.get(1)); }