@Test
  public void testCreateExistDatabase1() throws Exception {
    final String database = "root.db";

    try (final Connection connection = EnvFactory.getEnv().getConnection();
        final Statement statement = connection.createStatement()) {
      statement.execute(String.format("CREATE DATABASE %s", database));

      try {
        statement.execute(String.format("create database %s", database));
        fail();
      } catch (final SQLException e) {
        Assert.assertEquals(
            TSStatusCode.DATABASE_ALREADY_EXISTS.getStatusCode()
                + ": root.db has already been created as database",
            e.getMessage());
      }
    }
  }
Test creating a database that path is an existence database
integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateDatabaseIT.java