@Test public void shouldFailWhenDbExists() { when(client.get("/_all_dbs")).thenReturn(HttpResponseStub.valueOf(200, "[\"somedatabase\", \"anotherdatabase\"]")); try { instance.createDatabase("somedatabase/"); fail("RuntimeException expected"); } catch (Exception e) { } }
public void createDatabase(String path) { createDatabase(DbPath.fromString(path)); }
StdCouchDbInstance implements CouchDbInstance { public void createDatabase(String path) { createDatabase(DbPath.fromString(path)); } }
StdCouchDbInstance implements CouchDbInstance { public void createDatabase(String path) { createDatabase(DbPath.fromString(path)); } StdCouchDbInstance(HttpClient client);  StdCouchDbInstance(HttpClient client, ObjectMapperFactory of); }
StdCouchDbInstance implements CouchDbInstance { public void createDatabase(String path) { createDatabase(DbPath.fromString(path)); } 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(); }
StdCouchDbInstance implements CouchDbInstance { public void createDatabase(String path) { createDatabase(DbPath.fromString(path)); } 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();  }