@Test
public void testDeriveDataTypes() throws Exception {

    TestField f1 = new TestField();
    //f1.setNativeDataType("");
    f1.setSampleValues(Arrays.asList("10", "20", "30"));
    TestField f2 = new TestField();
    f2.setNativeDataType("");
    f2.setSampleValues(Arrays.asList("10.2", "20.3", "30.4"));
    TestField f3 = new TestField();
    f3.setNativeDataType("");
    f3.setSampleValues(Arrays.asList("BOB", "20.3", "30.4"));
    TestField f4 = new TestField();
    f4.setNativeDataType("BIGINT");
    f4.setSampleValues(Arrays.asList("2015", "203", "304"));
    TestField f5 = new TestField();
    f5.setNativeDataType("INVALIDTYPE");
    f5.setSampleValues(Arrays.asList("BOB", "20.3", "30.4"));
    TestField f6 = new TestField();
    f6.setSampleValues(null);
    ParserHelper.deriveDataTypes(TableSchemaType.HIVE, Arrays.asList(f1, f2, f3, f4, f5, f6));
    assertEquals("int", f1.getDerivedDataType());
    assertEquals("double", f2.getDerivedDataType());
    assertEquals("string", f3.getDerivedDataType());
    assertEquals("bigint", f4.getDerivedDataType());
    assertEquals("string", f5.getDerivedDataType());
    assertEquals("string", f6.getDerivedDataType());
}