@Test
public void testDollarPattern() throws Exception {

    InputStream stream = this.getClass().getClassLoader().getResourceAsStream("dollar-pattern.json");
    String content = TestUtils.readFile(stream);
    assertTrue(ruleMatcher.canCrawl("*", "/hello/test", content));
    assertTrue(ruleMatcher.canCrawl("*", "/hello/allow/this/rule/test", content));
    assertTrue(ruleMatcher.canCrawl("*", "/hello/allow/this/rule/test.php", content));
    assertTrue(ruleMatcher.canCrawl("*", "/name/test.php", content));
    assertFalse(ruleMatcher.canCrawl("*", "/hello/test%24", content));
    assertFalse(ruleMatcher.canCrawl("*", "/hello/test/", content));
    assertFalse(ruleMatcher.canCrawl("googleBot", "/hello/Test", content));
    assertFalse(ruleMatcher.canCrawl("007", "/test/", content));
    assertFalse(ruleMatcher.canCrawl("*", "/hello/allow/this/rule/test.PHP", content));
    assertFalse(ruleMatcher.canCrawl("*", "/hello/allow/this/rule/test.php5", content));
    assertFalse(ruleMatcher.canCrawl("*", "/hello/allow/this/rule/test.php/", content));
}