### Question:
StdCouchDbInstance implements CouchDbInstance { @Override public String setConfiguration(String section, String key, String value) { Assert.notNull(section, "Section may not be null"); Assert.notNull(key, "Key may not be null"); String url = "/_config/" + section + "/" + key; String content; try { content = objectMapper.writeValueAsString(value); } catch (JsonProcessingException e) { throw Exceptions.propagate(e); } return restTemplate.put(url, content, new StdResponseHandler<String>() { @Override public String success(HttpResponse hr) throws Exception { return objectMapper.readValue(hr.getContent(), String.class); } }); } 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 testSetConfigurationValue() { when(client.put(eq("/_config/httpd/port"),anyString())).thenReturn(HttpResponseStub.valueOf(200, "\"5984\"")); String oldConfig = instance.setConfiguration("httpd", "port", "5985"); assertEquals("5984", oldConfig); }