Group implements Comparable<Group> { public final boolean hasResourcesOfType(final ResourceType resourceType) { notNull(resourceType, "ResourceType cannot be null!"); for (final Resource resource : resources) { if (resourceType.equals(resource.getType())) { return true; } } return false; } Group();  Group(final String name); final boolean hasResourcesOfType(final ResourceType resourceType); boolean hasResource(final String resourceUri); void replace(final Resource resource, final List<Resource> expandedResources); final Group collectResourcesOfType(final ResourceType type); List<Resource> getResources(); Group addResource(final Resource resource); final void setResources(final List<Resource> resources); String getName(); @Override int compareTo(final Group o); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }
@Test(expected = NullPointerException.class) public void cannotPassNullResourceType() { final Group group = new Group("group"); group.hasResourcesOfType(null); }
@Test public void testNoResorucesOfTypeFound() { final Group group = new Group("group"); Assert.assertEquals(false, group.hasResourcesOfType(ResourceType.CSS)); Assert.assertEquals(false, group.hasResourcesOfType(ResourceType.JS)); }