PostgreSql extends DatabaseClient { public static PostgreSqlBuilder builder() { return new PostgreSqlBuilder(); } private  PostgreSql(Builder builder); static PostgreSqlBuilder builder(); @Override String getDialect(); @Override String[] getDropDdl(); @Override String[] getCreateDdl(); @Override String getSelectConnectionIdsSql(); @Override String getKillConnectionSql(String processID);  }
@Test public void testBuilder() { PostgreSql postgreSql = PostgreSql.builder() .setDropAndCreate(false) .setRootLogin("hello") .setRootPassword("world") .build(); assertThat(postgreSql.getDialect()).isEqualTo("postgresql"); assertThat(postgreSql.getDriverClassName()).isEqualTo("org.postgresql.Driver"); assertThat(postgreSql.getUrl()).isEqualTo("jdbc:postgresql: assertThat(postgreSql.getLogin()).isEqualTo("sonar"); assertThat(postgreSql.getPassword()).isEqualTo("sonar"); assertThat(postgreSql.isDropAndCreate()).isEqualTo(false); assertThat(postgreSql.getRootUrl()).isEqualTo("jdbc:postgresql: assertThat(postgreSql.getRootLogin()).isEqualTo("hello"); assertThat(postgreSql.getRootPassword()).isEqualTo("world"); }