@Test
  public void testConvertJsonTypes_given_postgres() {

    PostgresPlatform platform = new PostgresPlatform();
    DbTypeMap dbTypeMap = platform.getDbTypeMap();

    PlatformTypeConverter converter = new PlatformTypeConverter(dbTypeMap);

    assertThat(converter.convert("jsonblob")).isEqualTo("bytea");
    assertThat(converter.convert("jsonclob")).isEqualTo("text");
    assertThat(converter.convert("jsonvarchar(200)")).isEqualTo("varchar(200)");
    assertThat(converter.convert("json")).isEqualTo("json");
    assertThat(converter.convert("jsonb")).isEqualTo("jsonb");
  }
  @Test
  public void convert_withSuffix_expect_suffix() {

    PostgresPlatform pg = new PostgresPlatform();
    DbTypeMap dbTypeMap = pg.getDbTypeMap();

    PlatformTypeConverter converter = new PlatformTypeConverter(dbTypeMap);

    assertThat(converter.convert("varchar(10)")).isEqualTo("varchar(10)");
    assertThat(converter.convert("VARCHAR(10) default 'en' not null"))
        .isEqualTo("varchar(10) default 'en' not null");
    assertThat(converter.convert("DECIMAL(10,2) DEFAULT '0.00' NOT NULL"))
        .isEqualTo("decimal(10,2) DEFAULT '0.00' NOT NULL");
    assertThat(converter.convert("CRAZY(12,0) suffix")).isEqualTo("CRAZY(12,0) suffix");
    assertThat(converter.convert("CRAZY(12) suffix")).isEqualTo("CRAZY(12) suffix");
    assertThat(converter.convert("CRAZY suffix")).isEqualTo("CRAZY suffix");
  }
  @Test
  public void testConvert_given_postgres() throws Exception {

    PostgresPlatform pg = new PostgresPlatform();
    DbTypeMap dbTypeMap = pg.getDbTypeMap();

    PlatformTypeConverter converter = new PlatformTypeConverter(dbTypeMap);

    assertThat(converter.convert("varchar(10)")).isEqualTo("varchar(10)");
    assertThat(converter.convert("decimal(10,2)")).isEqualTo("decimal(10,2)");
    assertThat(converter.convert("clob")).isEqualTo("text");
    assertThat(converter.convert("blob")).isEqualTo("bytea");
    assertThat(converter.convert("tinyint")).isEqualTo("smallint");
    assertThat(converter.convert("funky")).isEqualTo("funky"); // unknown
    assertThat(converter.convert("integer(8)")).isEqualTo("integer"); // removes scale

    assertThat(converter.convert("funky(")).isEqualTo("funky(");
    assertThat(converter.convert("funky()")).isEqualTo("funky()");
    assertThat(converter.convert("funky)")).isEqualTo("funky)");
  }