NgTemplatePlus extends AbstractJavaScriptPlusComponent implements VariableOwner { @Override public NgTemplateState getState() { return (NgTemplateState) super.getState(); } NgTemplatePlus(String templateSource, String moduleName);  NgTemplatePlus(Package templatePackage, String moduleName);  NgTemplatePlus(File templateFolder, String moduleName); @Override NgTemplateState getState(); void addService(final String name, final Object callback); void setUserState(String key, String value); void setUserState(String key, Object value); Map<String, Object> getVariables();  }
@Test public void testConstructorStrings() { NgTemplatePlus template = new NgTemplatePlus("<h1>moin</h1>", "NgTemplateTest") { private static final long serialVersionUID = 1L; }; assertEquals("<h1>moin</h1>", template.getState().templateSource); assertEquals("NgTemplateTest", template.getState().moduleName); }
@Test public void testConstructorPackage() throws UnsupportedEncodingException, URISyntaxException, IOException { NgTemplatePlus template = new NgTemplatePlus( NgTemplatePlusTest.class.getPackage(), "NgTemplateTest") { private static final long serialVersionUID = 1L; }; assertEquals("<h1>heyho</h1>", template.getState().templateSource); assertEquals("NgTemplateTest", template.getState().moduleName); }