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 oneToOneWidgetElement = html.select("div.form-group > div.col-sm-10");
assertThat(oneToOneWidgetElement, notNullValue());
Elements selectElement = oneToOneWidgetElement.select(" > select");
assertThat(selectElement, notNullValue());
assertThat(selectElement.attr("id"), equalTo(oneToOneProperty));
String collectionElement = oneToOneProperty.substring(0, 1);
String optionsExpression = collectionElement + ".text for " + collectionElement + " in "
+ oneToOneProperty + "SelectionList";
assertThat(selectElement.attr("ng-options"), equalTo(optionsExpression));
assertThat(selectElement.attr("ng-model"), equalTo(oneToOneProperty + "Selection"));
}