public boolean insertAndUpdateClusterUsage(CounterMode counterMode, boolean ignoreQuotaLimit) {
        Capacity capacity = groupCapacityPersistService.getClusterCapacity();
        if (capacity == null) {
            insertGroupCapacity(GroupCapacityPersistService.CLUSTER);
        }
        return updateGroupUsage(counterMode, GroupCapacityPersistService.CLUSTER, PropertyUtil.getDefaultClusterQuota(),
                ignoreQuotaLimit);
    }
@Test
    void testInsertAndUpdateClusterUsage() {
        when(groupCapacityPersistService.insertGroupCapacity(any())).thenReturn(true);
        when(groupCapacityPersistService.incrementUsage(any())).thenReturn(true);
        when(groupCapacityPersistService.incrementUsageWithDefaultQuotaLimit(any())).thenReturn(true);
        when(groupCapacityPersistService.decrementUsage(any())).thenReturn(true);
        
        service.insertAndUpdateClusterUsage(CounterMode.INCREMENT, true);
        Mockito.verify(groupCapacityPersistService, times(1)).incrementUsage(any());
        
        service.insertAndUpdateClusterUsage(CounterMode.INCREMENT, false);
        Mockito.verify(groupCapacityPersistService, times(1)).incrementUsageWithDefaultQuotaLimit(any());
        
        service.insertAndUpdateClusterUsage(CounterMode.DECREMENT, true);
        Mockito.verify(groupCapacityPersistService, times(1)).decrementUsage(any());
    }