Template processor = processorFactory.create(templateResource, FreemarkerTemplate.class);
String output = processor.process(root);
Document html = Jsoup.parseBodyFragment(output);
assertThat(output.trim(), not(equalTo("")));
Elements container = html.select("div.form-group");
assertThat(container, notNullValue());
assertThat(container.attr("ng-class"), not(equalTo("")));
Elements nToManyWidgetElement = html.select("div.form-group > div.col-sm-10");
assertThat(nToManyWidgetElement, notNullValue());
Elements selectElement = nToManyWidgetElement.select(" > select");
assertThat(selectElement.attr("id"), equalTo(oneToManyProperty));
assertThat(selectElement.attr("multiple"), notNullValue());
assertThat(selectElement.attr("ng-model"), equalTo(oneToManyProperty+"Selection"));
String collectionElement = oneToManyProperty.substring(0, 1);
String optionsExpression = collectionElement +".text for "+ collectionElement +" in " + oneToManyProperty + "SelectionList";
assertThat(selectElement.attr("ng-options"), equalTo(optionsExpression));
}