CouchbaseManager { protected static Pair<PasswordAuthenticator, List<String>> getConnectionObjectsFromHostOrKey(String hostOrKey) { URI singleHostURI = checkAndGetURI(hostOrKey); if (singleHostURI == null || singleHostURI.getScheme() == null) { return getConnectionObjectsFromConfigurationKey(hostOrKey); } else { return getConnectionObjectsFromHost(singleHostURI); } } protected  CouchbaseManager(); static CouchbaseConnection getConnection(String hostOrKey, String bucketName); static String getConfig(String key);  }
@Test public void testCompleteURI() { Pair<PasswordAuthenticator, List<String>> connectionObjectsFromHostOrKey = CouchbaseManager.getConnectionObjectsFromHostOrKey("couchbase: Assert.assertEquals(USERNAME, connectionObjectsFromHostOrKey.first().username()); Assert.assertEquals(PASSWORD, connectionObjectsFromHostOrKey.first().password()); Assert.assertEquals(Arrays.asList("couchbase: }
@Test public void testCompleteURIButNoPort() { Pair<PasswordAuthenticator, List<String>> connectionObjectsFromHostOrKey = CouchbaseManager.getConnectionObjectsFromHostOrKey("couchbase: Assert.assertEquals(USERNAME, connectionObjectsFromHostOrKey.first().username()); Assert.assertEquals(PASSWORD, connectionObjectsFromHostOrKey.first().password()); Assert.assertEquals(Arrays.asList("couchbase: }