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(enumProperty));
assertThat(selectElement.attr("ng-model"), equalTo(StringUtils.camelCase(ENTITY_NAME) + "." + enumProperty));
String collectionElement = enumProperty.substring(0, 1);
String optionsExpression = collectionElement +" for "+ collectionElement +" in " + enumProperty + "List";
assertThat(selectElement.attr("ng-options"), equalTo(optionsExpression));
}