@Test
public void shouldProvideHiveTypeFromParquetType() throws Exception {

    HiveClient hiveClient = new HiveClient(driverName, "jdbc:hive2://localhost:" + port, "garmadon",
        hdfsTemp + "/garmadon_database");
    PrimitiveType string = new PrimitiveType(Type.Repetition.OPTIONAL, PrimitiveType.PrimitiveTypeName.BINARY, "name");
    assertEquals("string", hiveClient.inferHiveType(string));
    PrimitiveType array_string = new PrimitiveType(Type.Repetition.REPEATED, PrimitiveType.PrimitiveTypeName.BINARY, "name");
    assertEquals("array<string>", hiveClient.inferHiveType(array_string));
    PrimitiveType int32 = new PrimitiveType(Type.Repetition.OPTIONAL, PrimitiveType.PrimitiveTypeName.INT32, "name");
    assertEquals("int", hiveClient.inferHiveType(int32));
    PrimitiveType int64 = new PrimitiveType(Type.Repetition.OPTIONAL, PrimitiveType.PrimitiveTypeName.INT64, "name");
    assertEquals("bigint", hiveClient.inferHiveType(int64));
    PrimitiveType floatz = new PrimitiveType(Type.Repetition.OPTIONAL, PrimitiveType.PrimitiveTypeName.FLOAT, "name");
    assertEquals("float", hiveClient.inferHiveType(floatz));
    PrimitiveType doublez = new PrimitiveType(Type.Repetition.OPTIONAL, PrimitiveType.PrimitiveTypeName.DOUBLE, "name");
    assertEquals("double", hiveClient.inferHiveType(doublez));
    PrimitiveType booleanz = new PrimitiveType(Type.Repetition.OPTIONAL, PrimitiveType.PrimitiveTypeName.BOOLEAN, "name");
    assertEquals("boolean", hiveClient.inferHiveType(booleanz));
}