PostgreSQLArrayColumnType { public static int getTypeOidByColumnTypeName(final String columnTypeName) throws IllegalArgumentException { if (COLUMN_TYPE_NAME_OID_MAP.containsKey(columnTypeName)) { return COLUMN_TYPE_NAME_OID_MAP.get(columnTypeName); } throw new IllegalArgumentException(String.format("Cannot find PostgreSQL type oid for columnTypeName '%s'", columnTypeName)); }  static int getTypeOidByColumnTypeName(final String columnTypeName);  }
@Test public void assertIntegerArrayGot() { int columnTypeName = PostgreSQLArrayColumnType.getTypeOidByColumnTypeName("_int4"); assertThat(columnTypeName, is(1007)); }
@Test(expected = IllegalArgumentException.class) public void assertIllegalArgExThrown() { PostgreSQLArrayColumnType.getTypeOidByColumnTypeName("not_exist_type"); }