@Test
public void testEquals() {

    final Rule newAllow = new Rule(Rules.DEFAULT_ALLOW.getType(), Rules.DEFAULT_ALLOW.getPattern());
    assertEquals("DEFAULT_ALLOW should equal new rule with same params as DEFAULT_ALLOW",
            Rules.DEFAULT_ALLOW, newAllow);
    assertNotEquals("DEFAULT_ALLOW should not equal new ALLOW rule with different pattern",
            Rules.DEFAULT_ALLOW, new Rule(Rules.DEFAULT_ALLOW.getType(), Pattern.compile("foo")));
    assertNotEquals("DEFAULT_DENY should not equal new ALLOW rule with same params as DEFAULT_ALLOW",
            Rules.DEFAULT_DENY, newAllow);
    assertNotEquals("DEFAULT_INCLUDE should not equal new ALLOW rule with same params as DEFAULT_ALLOW",
            Rules.DEFAULT_INCLUDE, newAllow);
}