public void summarize() {
DmdlSemantics resolved = resolve();
ModelDeclaration simple = resolved.findModelDeclaration("simple");
assertThat(simple, not(nullValue()));
PropertyDeclaration key = simple.findPropertyDeclaration("key");
assertThat(key, not(nullValue()));
assertThat(key.getType(), is(type(BasicTypeKind.INT)));
PropertyDeclaration sum = simple.findPropertyDeclaration("sum");
assertThat(sum, not(nullValue()));
assertThat(sum.getType(), is(type(BasicTypeKind.LONG)));
PropertyDeclaration count = simple.findPropertyDeclaration("count");
assertThat(count, not(nullValue()));
assertThat(count.getType(), is(type(BasicTypeKind.LONG)));
PropertyDeclaration max = simple.findPropertyDeclaration("max");
assertThat(max, not(nullValue()));
assertThat(max.getType(), is(type(BasicTypeKind.DATE)));
PropertyDeclaration min = simple.findPropertyDeclaration("min");
assertThat(min, not(nullValue()));
assertThat(min.getType(), is(type(BasicTypeKind.DATE)));
SummarizeTrait trait = simple.getTrait(SummarizeTrait.class);
assertThat(trait, not(nullValue()));
assertThat(trait.getTerms().size(), is(1));