### Question:
RedisClientConnectionProperties { public int database() { if (connection.getPath() == null || connection.getPath().equals("") || connection.getPath().equals("/")) { return Protocol.DEFAULT_DATABASE; } return Integer.parseInt(connection.getPath().substring(1)); } RedisClientConnectionProperties(URI connection); boolean isSSL(); String password(); String addr(); int port(); int database();  }### Answer:
@Test public void getConfiguredDatabase() { URI uri = URI.create(TEST_CONFGIURED_DATABASE); RedisClientConnectionProperties rcp = new RedisClientConnectionProperties(uri); assertEquals(8, rcp.database()); }
@Test public void getDefaultDatabase() { URI uri = URI.create(TEST_DEFAULT_DATABASE); RedisClientConnectionProperties rcp = new RedisClientConnectionProperties(uri); assertEquals(Protocol.DEFAULT_DATABASE, rcp.database()); }