### Question:
Group { public final boolean hasResourcesOfType(final ResourceType resourceType) { Validate.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); @Override boolean equals(final Object obj); String getName(); @Override int hashCode(); @Override String toString();  }### Answer:
@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)); }