### Question:
HMSClient implements AutoCloseable { boolean createDatabase(@NotNull String name) throws TException { return createDatabase(name, null, null, null); } 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 createExistingDatabase() { Throwable exception = Assertions.assertThrows(AlreadyExistsException.class, () -> client.createDatabase(TEST_DATABASE)); }
@Test public void createDatabaseNullName() { Database db = new Util.DatabaseBuilder(TEST_DATABASE) .build(); db.setName(null); Throwable exception = Assertions.assertThrows(MetaException.class, () -> client.createDatabase(db)); }
@Test public void createDatabaseEmptyName() { Assume.assumeTrue(client != null); Database db = new Util.DatabaseBuilder(TEST_DATABASE) .build(); db.setName(""); Throwable exception = Assertions.assertThrows(InvalidObjectException.class, () -> client.createDatabase(db)); }