ResourceFactory { public static IInlineResource createInlineResource(String type, String content) { return ResourceManager.INSTANCE.resolveInline(type, content); }  static IAggregatedResource createAggregatedResource(List<IResource> resources); static IInlineResource createInlineResource(String type, String content); static IExternalResource createExternalResource(String type, String url); static IResource createLibraryResource(String resourcePath); static IResource createResource(IResourceUrn urn, URL url, IResourceLocale locale, IResourceLibrary library); static IResource createResource(String resourcePath); static IResource createResourceByEl(String el); static IResource createResource(String resourceType, String namespace, String resourcePath); static IResource createResource(String resourceType, String namespace, String resourcePath,
         Map<String, Object> arguments); static IResource createResource(URL url, String locale, IResourceLibrary libraryInfo); static IResource createWarResource(String resourcePath);  }
@Test public void testInline() { IInlineResource resource = ResourceFactory.createInlineResource(ResourceTypeConstants.JS, "document.write('this is sample.');"); Assert.assertEquals(ResourceTypeConstants.JS, resource.getUrn().getType()); Assert.assertEquals("js.inline:/i4o1ke3h124fbh5gzbfqs5usd2y", resource.getUrn().toString()); Assert.assertEquals("document.write('this is sample.');", resource.getInlineText()); }