@Test
public void testNonBooleanConfig() {

    configurationService.setProperty("usage-statistics.bots.case-insensitive", "RandomNonBooleanString");
    spiderDetectorService = new SpiderDetectorServiceImpl(configurationService);
    DummyHttpServletRequest req = new DummyHttpServletRequest();
    req.setAddress(NOT_A_BOT_ADDRESS); // avoid surprises
    req.setRemoteHost("notabot.example.com"); // avoid surprises
    req.setAgent("Firefox"); // avoid surprises
    String candidate;
    // Test agent patterns
    req.setAgent("msnbot is WaTching you");
    assertTrue("'msnbot' didn't match pattern", spiderDetectorService.isSpider(req));
    req.setAgent("MSNBOT Is WaTching you");
    assertFalse("'msnbot' matched pattern", spiderDetectorService.isSpider(req));
    // Test DNS patterns
    candidate = "baiduspider-dspace-test.crawl.baidu.com";
    req.setRemoteHost(candidate);
    assertTrue(candidate + " did not match DNS patterns", spiderDetectorService.isSpider(req));
    candidate = "baiduspiDer-dSPace-test.crawl.baIDu.com";
    req.setRemoteHost(candidate);
    assertFalse(candidate + " matched DNS patterns", spiderDetectorService.isSpider(req));
}