### Question:
SchemaUtil { public static String getSqlTypeName(Schema schema) { switch (schema.type()) { case INT32: return "INT"; case INT64: return "BIGINT"; case FLOAT32: case FLOAT64: return "DOUBLE"; case BOOLEAN: return "BOOLEAN"; case STRING: return "VARCHAR"; case ARRAY: return "ARRAY<" + getSqlTypeName(schema.valueSchema()) + ">"; case MAP: return "MAP<" + getSqlTypeName(schema.keySchema()) + "," + getSqlTypeName(schema.valueSchema()) + ">"; default: throw new KsqlException(String.format("Invalid type in schema: %s.", schema.toString())); } }  static Class getJavaType(final Schema schema); static Optional<Field> getFieldByName(final Schema schema, final String fieldName); static Schema getTypeSchema(final String sqlType); static int getFieldIndexByName(final Schema schema, final String fieldName); static Schema buildSchemaWithAlias(final Schema schema, final String alias); static String getSchemaFieldName(Field field); static String getJavaCastString(Schema schema); static Schema addImplicitRowTimeRowKeyToSchema(Schema schema); static Schema removeImplicitRowTimeRowKeyFromSchema(Schema schema); static Set<Integer> getRowTimeRowKeyIndexes(Schema schema); static String getSchemaDefinitionString(Schema schema); static String getSqlTypeName(Schema schema); static String buildAvroSchema(final Schema schema, String name); static Schema getAvroSerdeKsqlSchema(Schema schema); static String getFieldNameWithNoAlias(Field field); static Schema getSchemaWithNoAlias(Schema schema); static int getIndexInSchema(final String fieldName, final Schema schema); static final String ARRAY; static final String MAP; static final String ROWKEY_NAME; static final String ROWTIME_NAME; static final int ROWKEY_NAME_INDEX; }### Answer:
@Test public void shouldGetCorrectSqlType() { String sqlType1 = SchemaUtil.getSqlTypeName(Schema.BOOLEAN_SCHEMA); String sqlType2 = SchemaUtil.getSqlTypeName(Schema.INT32_SCHEMA); String sqlType3 = SchemaUtil.getSqlTypeName(Schema.INT64_SCHEMA); String sqlType4 = SchemaUtil.getSqlTypeName(Schema.FLOAT64_SCHEMA); String sqlType5 = SchemaUtil.getSqlTypeName(Schema.STRING_SCHEMA); String sqlType6 = SchemaUtil.getSqlTypeName(SchemaBuilder.array(Schema.FLOAT64_SCHEMA)); String sqlType7 = SchemaUtil.getSqlTypeName(SchemaBuilder.map(Schema.STRING_SCHEMA, Schema.FLOAT64_SCHEMA)); assertThat("Invalid SQL type.", sqlType1, equalTo("BOOLEAN")); assertThat("Invalid SQL type.", sqlType2, equalTo("INT")); assertThat("Invalid SQL type.", sqlType3, equalTo("BIGINT")); assertThat("Invalid SQL type.", sqlType4, equalTo("DOUBLE")); assertThat("Invalid SQL type.", sqlType5, equalTo("VARCHAR")); assertThat("Invalid SQL type.", sqlType6, equalTo("ARRAY<DOUBLE>")); assertThat("Invalid SQL type.", sqlType7, equalTo("MAP<VARCHAR,DOUBLE>")); }