### Question:
HMSClient implements AutoCloseable { Set<String> getAllDatabases(@Nullable String filter) throws TException { if (filter == null || filter.isEmpty()) { return new HashSet<>(client.get_all_databases()); } return client.get_all_databases() .stream() .filter(n -> n.matches(filter)) .collect(Collectors.toSet()); } HMSClient(@Nullable URI uri);   HMSClient(@Nullable URI uri, @Nullable String confDir); URI getServerURI(); @Override String toString(); boolean dropPartition(@NotNull String dbName, @NotNull String tableName,
                               @NotNull List<String> arguments); @Override void close();  }### Answer:
@Test public void getAllDatabases() throws Exception { Set<String> databases = client.getAllDatabases(null); MatcherAssert.assertThat(databases, Matchers.hasItem("default")); MatcherAssert.assertThat(databases, Matchers.hasItem(TEST_DATABASE.toLowerCase())); assertThat(client.getAllDatabases(TEST_DATABASE.toLowerCase()), Matchers.contains(TEST_DATABASE.toLowerCase())); }