@Test
public void testAssertionMatch() {

    File fileDir = new File("/home/athenz/zms_store");
    File quotaDir = new File("/home/athenz/zms_quota");
    Assertion assertion1 = new Assertion();
    assertion1.setAction("UPDATE").setResource("resource").setRole("zmsRole");
    Assertion assertion2 = new Assertion();
    assertion2.setAction("UPDATE").setResource("resource").setRole("zmsRole");
    try (FileConnection fileconnection = new FileConnection(fileDir, quotaDir)) {
        assertTrue(fileconnection.assertionMatch(assertion1, assertion2));
        Assertion assertion3 = new Assertion();
        assertion3.setAction("UPDATE").setResource("resource").setRole("zmsRole");
        Assertion assertion4 = new Assertion();
        assertion4.setAction("Delete").setResource("resource").setRole("zmsRole");
        assertFalse(fileconnection.assertionMatch(assertion3, assertion4));
        Assertion assertion5 = new Assertion();
        assertion5.setAction("UPDATE").setResource("resource1").setRole("zmsRole");
        Assertion assertion6 = new Assertion();
        assertion6.setAction("UPDATE").setResource("resource2").setRole("zmsRole");
        assertFalse(fileconnection.assertionMatch(assertion5, assertion6));
        Assertion assertion7 = new Assertion();
        assertion7.setAction("UPDATE").setResource("resource").setRole("zmsRole1");
        Assertion assertion8 = new Assertion();
        assertion8.setAction("UPDATE").setResource("resource").setRole("zmsRole2");
        assertFalse(fileconnection.assertionMatch(assertion7, assertion8));
        Assertion assertion9 = new Assertion();
        AssertionEffect effect1 = AssertionEffect.ALLOW;
        assertion9.setAction("UPDATE").setResource("resource").setRole("zmsRole").setEffect(effect1);
        Assertion assertion10 = new Assertion();
        assertion10.setAction("UPDATE").setResource("resource").setRole("zmsRole").setEffect(effect1);
        assertTrue(fileconnection.assertionMatch(assertion9, assertion10));
        Assertion assertion11 = new Assertion();
        AssertionEffect effect2 = AssertionEffect.ALLOW;
        AssertionEffect effect3 = AssertionEffect.DENY;
        assertion11.setAction("UPDATE").setResource("resource").setRole("zmsRole").setEffect(effect2);
        Assertion assertion12 = new Assertion();
        assertion12.setAction("UPDATE").setResource("resource").setRole("zmsRole").setEffect(effect3);
        assertFalse(fileconnection.assertionMatch(assertion11, assertion12));
    }
}