@Nonnull
public Database createInternalDb() {
// return new Database( database.getDbRoot().getUriBuilder().replacePath( "" ).build().toString(), database.getDbName() );
URI uri = database.getDbRoot().getURI();
Database internalDb = new Database( uri.getHost(), uri.getPort(), database.getDbName() );
UsernamePasswordCredentials credentials = extractCredentials( database.getClientFilters() );
if ( credentials != null ) {
internalDb.getServer().setCredentials( AuthScope.ANY, credentials );
}
return internalDb;
}