@Test
void should_build_type_mapping_for_expression() {

  assertThat(
      buildTypeMapping(Arrays.asList(
          named("avg(balance)", new AvgAggregator(
              Arrays.asList(dsl.abs(ref("balance", INTEGER))), INTEGER))),
          Arrays.asList(named("age", dsl.asin(ref("age", INTEGER))))),
      containsInAnyOrder(
          map("avg(balance)", INTEGER),
          map("age", DOUBLE)
      ));
}