public void checkResourcesForDuplicates(ArrayList<HeadResource> resources, String whichResources) {
int numberOfResources = resources.size();
for (int i = 0; i < numberOfResources; i++) {
HeadResource resource1 = resources.get(i);
for (int j = i + 1; j < numberOfResources; j++) {
HeadResource resource2 = resources.get(j);
if (!resource2.isDuplicate() && resource1.equals(resource2)) {
logger.log(Level.INFO,
"checkResourcesForDuplicates: " + whichResources + " occur more than once: type = " +
resource1.getType() + " url = " + resource1.getURL());
resource2.setDuplicate(true);
assertTrue(whichResources + " occur more than once: type = " + resource1.getType() + " url = " +
resource1.getURL(), false);
break;
}