@Test
public void getQueryWithAlterColumn(){

  String origMetaString = "{  " +
      "  \"database\": \"default\",  " +
      "  \"table\": \"table2\",  " +
      "  \"columns\": [{  " +
      "   \"name\": \"COL1\",  " +
      "   \"type\": \"TINYINT\",  " +
      "   \"comment\": \"\",  " +
      "   \"precision\": null,  " +
      "   \"scale\": null  " +
      "  }, {  " +
      "   \"name\": \"col2\",  " +
      "   \"type\": \"VARCHAR\",  " +
      "   \"comment\": \"\",  " +
      "   \"precision\": \"333\",  " +
      "   \"scale\": null  " +
      "  }, {  " +
      "   \"name\": \"col3\",  " +
      "   \"type\": \"DECIMAL\",  " +
      "   \"comment\": \"\",  " +
      "   \"precision\": \"33\",  " +
      "   \"scale\": \"3\"  " +
      "  }],  " +
      "  \"partitionInfo\": {  " +
      "   \"columns\": []  " +
      "  },  " +
      "  \"detailedInfo\": {  " +
      "   \"parameters\": {}  " +
      "  },  " +
      "  \"storageInfo\": {}  " +
      " }";
  
  String newMetaString = "{  " +
      "    \"database\": \"default\",  " +
      "    \"table\": \"table2\",  " +
      "    \"columns\": [{  " +
      "      \"name\": \"col1\",  " +
      "      \"type\": \"TINYINT\",  " +
      "      \"comment\": \"\",  " +
      "      \"precision\": null,  " +
      "      \"scale\": null  " +
      "    }, {  " +
      "      \"name\": \"col3\",  " +
      "      \"type\": \"STRING\",  " +
      "      \"comment\": \"\",  " +
      "      \"precision\": \"333\",  " +
      "      \"scale\": null  " +
      "    }, {  " +
      "      \"name\": \"col4\",  " +
      "      \"type\": \"TINYINT\",  " +
      "      \"comment\": \"\",  " +
      "      \"precision\": null,  " +
      "      \"scale\": null  " +
      "    }],  " +
      "    \"partitionInfo\": {  " +
      "      \"columns\": []  " +
      "    },  " +
      "    \"detailedInfo\": {  " +
      "      \"parameters\": {}  " +
      "    },  " +
      "    \"storageInfo\": {}  " +
      "  }";
  Gson gson = new Gson();
  TableMeta origTableMeta = gson.fromJson(origMetaString, TableMeta.class);
  TableMeta updatedTableMeta = gson.fromJson(newMetaString, TableMeta.class);
  LOG.info("origTableMeta : {},\n\nupdatedTableMeta : {}", origMetaString, updatedTableMeta);
  AlterTableQueryGenerator generator = new AlterTableQueryGenerator(origTableMeta, updatedTableMeta);
  Optional<String> query = generator.getQuery();
  Assert.assertTrue(query.isPresent());
  String hqlQuery = query.get();
  LOG.info("hqlQuery : {}", hqlQuery);
  String expectedQuery = " ALTER TABLE `default`.`table2`  CHANGE COLUMN `col2` `col3` STRING(333);\n" +
      " ALTER TABLE `default`.`table2`  CHANGE COLUMN `col3` `col4` TINYINT";
  Assert.assertEquals("Alter Edit table query did not match ", expectedQuery, hqlQuery);
}