@Test
public void isMatch_againstMultipleRules() {

    RequestFilter requestFilter = new RequestFilter(Arrays.asList(
            "/todos",
            "/todos/*",
            "/todos/*/comments/*",
            "/todos/*/comments/*/users"
    ));
    assertTrue(requestFilter.isMatch("https://www.test.com/todos/1"));
    assertTrue(requestFilter.isMatch("https://www.test.com/todos/1/"));
    assertTrue(requestFilter.isMatch("/todos/1/"));
    assertTrue(requestFilter.isMatch("todos/1/"));
    assertTrue(requestFilter.isMatch("www.test.com/todos"));
    assertTrue(requestFilter.isMatch("www.test.com/todos/"));
    assertTrue(requestFilter.isMatch("todos?query=1"));
    assertFalse(requestFilter.isMatch("https://www.test.com/todos/1/comments"));
    assertFalse(requestFilter.isMatch("https://www.test.com/todos/1/comments/"));
    assertTrue(requestFilter.isMatch("/todos/1/comments/1"));
    assertTrue(requestFilter.isMatch("/todos/1/comments/1/"));
    assertTrue(requestFilter.isMatch("https://www.test.com/todos/1/comments/1/users"));
    assertTrue(requestFilter.isMatch("https://www.test.com/todos/1/comments/1/users/"));
    assertFalse(requestFilter.isMatch("https://www.test.com/todos/1/comments/1/users/20"));
    assertFalse(requestFilter.isMatch("https://www.test.com/todos/1/comments/1/users/20/"));
    assertFalse(requestFilter.isMatch("/comments"));
}