@Test
public void testCheckGroupQuota() {

    QuotaChecker quotaCheck = new QuotaChecker();
    Quota mockQuota = new Quota().setName("athenz")
            .setGroup(2).setGroupMember(2);
    ObjectStoreConnection con = Mockito.mock(ObjectStoreConnection.class);
    Mockito.when(con.getQuota("athenz")).thenReturn(mockQuota);
    Mockito.when(con.countGroups("athenz")).thenReturn(1);
    ArrayList<GroupMember> groupMembers = new ArrayList<>();
    groupMembers.add(new GroupMember().setMemberName("user.joe"));
    Group group = new Group().setGroupMembers(groupMembers);
    // this should be successful - no exceptions
    quotaCheck.checkGroupQuota(con, "athenz", group, "caller");
}