@Test
public void testIsSpiderStringStringStringString()
{

    String candidate;
    // Test IP patterns
    candidate = "192.168.2.1";
    assertTrue(candidate + " did not match IP patterns",
            spiderDetectorService.isSpider(candidate, null, null, null));
    candidate = NOT_A_BOT_ADDRESS;
    assertFalse(candidate + " matched IP patterns",
            spiderDetectorService.isSpider(candidate, null, null, null));
    // Test DNS patterns
    candidate = "baiduspider-dspace-test.crawl.baidu.com";
    assertTrue(candidate + " did not match DNS patterns",
            spiderDetectorService.isSpider(NOT_A_BOT_ADDRESS, null, candidate, null));
    candidate = "wiki.dspace.org";
    assertFalse(candidate + " matched DNS patterns",
            spiderDetectorService.isSpider(NOT_A_BOT_ADDRESS, null, candidate, null));
    // Test agent patterns
    candidate = "msnbot is watching you";
    assertTrue("'" + candidate + "' did not match agent patterns",
            spiderDetectorService.isSpider(NOT_A_BOT_ADDRESS, null, null, candidate));
    candidate = "Firefox";
    assertFalse("'" + candidate + "' matched agent patterns",
            spiderDetectorService.isSpider(NOT_A_BOT_ADDRESS, null, null, candidate));
}