ResourceWrapper implements IResource { public ResourceWrapper(IResource resource) { m_resource = resource; } ResourceWrapper(IResource resource); @Override byte[] getBinaryContent(IResourceContext context); @Override String getContent(IResourceContext context); @Override List<IResource> getDependencies(); @Override long getLastModified(); @Override IResourceLibrary getLibrary(); @Override IResourceLocale getLocale(); @Override byte[] getOriginalBinaryContent(); @Override byte[] getOriginalBinaryContent(ITemplateContext context); @Override String getOriginalContent(); @Override String getOriginalContent(ITemplateContext context); @Override URL getOriginalUrl(); @Override String getUrl(IResourceContext context); @Override IResourceUrn getUrn(); @Override void setDependencies(List<IResource> resources); @Override void setHandler(IResourceHandler handler);  }
@Test public void testResourceWrapper() { IResource resource = ResourceFactory.createResource("/js/sample/sample.js"); ResourceWrapper wrapper = new ResourceWrapper(resource); IResourceContext context = ResourceRuntimeContext.ctx().getResourceContext(); wrapper.getBinaryContent(context); wrapper.getContent(context); wrapper.getDependencies(); wrapper.getLastModified(); wrapper.getLibrary(); wrapper.getLocale(); wrapper.getOriginalBinaryContent(); wrapper.getOriginalBinaryContent(new MockTemplateContext()); wrapper.getOriginalContent(); wrapper.getOriginalContent(new MockTemplateContext()); wrapper.getOriginalUrl(); wrapper.getUrl(context); wrapper.getUrn(); wrapper.setDependencies(null); wrapper.setHandler(null); }