@Test
public void testGetNamedAggregateFieldDefinitions() {

    SoqlQueryAnalyzer analyzer = new SoqlQueryAnalyzer("SELECT count(Name) nameCount FROM Account", n -> this.describeSObject(n));
    List<FieldDef> actuals = listFlatFieldDefinitions(analyzer.getFieldDefinitions());
    assertEquals(1, actuals.size());
    assertEquals("nameCount", actuals.get(0).getName());
    assertEquals("int", actuals.get(0).getType());
}