kettleDataFactory.initialize(new DesignTimeDataFactoryContext());
kettleDataFactory.setQuery("default",
new KettleTransFromFileProducer(QUERY, STEP, new FormulaArgument[0], new FormulaParameter[0]));
final DataFactoryMetaData metaData = kettleDataFactory.getMetaData();
final Object queryHash = metaData.getQueryHash(kettleDataFactory, "default", new StaticDataRow());
assertNotNull(queryHash);
final KettleDataFactory kettleDataFactory2 = new KettleDataFactory();
kettleDataFactory2.initialize(new DesignTimeDataFactoryContext());
kettleDataFactory2.setQuery("default",
new KettleTransFromFileProducer(QUERY + "2", STEP, new FormulaArgument[0], new FormulaParameter[0]));
kettleDataFactory2.setQuery("default2",
new KettleTransFromFileProducer(QUERY, STEP, new FormulaArgument[0], new FormulaParameter[0]));
assertNotEquals("Physical Query is not the same", queryHash, metaData.getQueryHash(kettleDataFactory2, "default", new StaticDataRow()));
assertEquals("Physical Query is the same", queryHash, metaData.getQueryHash(kettleDataFactory2, "default2", new StaticDataRow()));
}