Resource implements IResource { public Resource(IResourceUrn urn, URL physicalUrl, IResourceLocale locale, IResourceLibrary libraryInfo) { m_urn = urn; m_url = physicalUrl; m_locale = locale; m_libInfo = libraryInfo; } Resource(IResourceUrn urn, URL physicalUrl, IResourceLocale locale, IResourceLibrary libraryInfo);  Resource(Resource resource); @Override boolean equals(Object obj); @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 int hashCode(); @Override void setDependencies(List<IResource> dependencies); void setHandler(IResourceHandler handler); @Override String toString();  }
@Test public void testResource() { Resource resource = (Resource)ResourceFactory.createResource("/js/sample/sample.js"); resource.hashCode(); Assert.assertTrue(resource.equals(resource)); Assert.assertFalse(resource.equals(null)); Assert.assertFalse(resource.equals(new Object())); Resource resource1 = (Resource)ResourceFactory.createResource("/js/sample/sample1.js"); Assert.assertFalse(resource.equals(resource1)); Assert.assertTrue(resource1.getDependencies().isEmpty()); }