* CLK-453
*/
public void testGetHeadElements() {
MockContext.initContext();
Page page = new Page();
PageImports pageImports = new PageImports(page);
// Check imports using an internal Form Control
FormTable table = new FormTable("table");
pageImports.processControl(table);
List<Element> headElements = pageImports.getHeadElements();
List<Element> jsElements = pageImports.getJsElements();
assertTrue(headElements.get(0).toString().contains("/table.css"));
assertTrue(headElements.get(1).toString().contains("/control.css"));
assertTrue(jsElements.get(0).toString().contains("/control.js"));
// Check imports using an external Form Control
page = new Page();
pageImports = new PageImports(page);
Form form = new Form("form");
table = new FormTable("table", form);
form.add(table);