JdbcUri { public Map<String, String> getParameters() { Map<String, String> result = new HashMap<>(); if (Strings.isNullOrEmpty(jdbcUri.getQuery())) { return result; } String[] parameters = jdbcUri.getQuery().split("&"); for (String each : parameters) { String[] args = each.split("="); result.put(args[0], 1 == args.length ? null : args[1]); } return result; } JdbcUri(final String jdbcUrl); String getScheme(); String getHostname(); int getPort(); String getHost(); String getDatabase(); Map<String, String> getParameters();  }
@Test public void assertGetParameters() { Map<String, String> parameters = new JdbcUri("jdbc:mysql: assertThat(parameters.size(), is(2)); assertThat(parameters.get("useSSL"), is("true")); assertThat(parameters.get("maxReconnects"), is("30")); }