@Test
public void testCheckPolicyQuota() {

    
    QuotaChecker quotaCheck = new QuotaChecker();
    Quota mockQuota = new Quota().setName("athenz")
            .setPolicy(2).setAssertion(2);
    ObjectStoreConnection con = Mockito.mock(ObjectStoreConnection.class);
    Mockito.when(con.getQuota("athenz")).thenReturn(mockQuota);
    Mockito.when(con.countPolicies("athenz")).thenReturn(1);
    
    ArrayList<Assertion> assertions = new ArrayList<>();
    assertions.add(new Assertion().setAction("*").setResource("*").setRole("admin"));
    
    Policy policy = new Policy();
    policy.setAssertions(assertions);
    
    // this should be successful - no exceptions
    quotaCheck.checkPolicyQuota(con, "athenz", policy, "caller");
}