pmdDataFactory.setQuery("default", MULTIPLE_AGG_QUERY, null, null);
final CloseableTableModel tableModel = (CloseableTableModel) pmdDataFactory.queryData("default", new ParameterDataRow());
try
{
final DefaultDataSchemaDefinition def = new DefaultDataSchemaDefinition();
final DataSchemaCompiler compiler = new DataSchemaCompiler(def, new DefaultDataAttributeContext());
final DataSchema dataSchema = compiler.compile(tableModel);
final String[] names = dataSchema.getNames();
assertEquals(3, names.length);
assertEquals("BC_CUSTOMER_W_TER_TERRITORY", names[0]);