InlineResource extends Resource implements IInlineResource { protected InlineResource(IResourceUrn urn, URL physicalUrl, IResourceLocale locale, IResourceLibrary libraryInfo) { super(urn, physicalUrl, locale, libraryInfo); } protected  InlineResource(IResourceUrn urn, URL physicalUrl, IResourceLocale locale, IResourceLibrary libraryInfo);  InlineResource(String inlineText, String resType); @Override String getContent(IResourceContext context); @Override String getInlineText(); @Override long getLastModified(); @Override byte[] getOriginalBinaryContent(); @Override byte[] getOriginalBinaryContent(ITemplateContext context); @Override String getOriginalContent(); @Override String getOriginalContent(ITemplateContext context);  }
@Test public void testInlineResource() { String text = "document.write(\"this is sample.js<br>\");"; InlineResource inline = new InlineResource(text, "js"); Assert.assertEquals(0, inline.getLastModified()); IResourceContext context = ResourceRuntimeContext.ctx().getResourceContext(); Assert.assertEquals(text, inline.getContent(context)); Assert.assertEquals(text, new String(inline.getOriginalBinaryContent(new MockTemplateContext()))); InlineResource inline1 = new InlineResource(new ResourceUrn("js", "local", "/js/sample/sample.js"), null, null, null); Assert.assertNotNull(inline1); }