private void correctGroupUsage() {
        long lastId = 0;
        int pageSize = 100;
        while (true) {
            List<GroupCapacity> groupCapacityList = groupCapacityPersistService
                    .getCapacityList4CorrectUsage(lastId, pageSize);
            if (groupCapacityList.isEmpty()) {
                break;
            }
            lastId = groupCapacityList.get(groupCapacityList.size() - 1).getId();
            for (GroupCapacity groupCapacity : groupCapacityList) {
                String group = groupCapacity.getGroup();
                groupCapacityPersistService.correctUsage(group, TimeUtils.getCurrentTime());
            }
            try {
                Thread.sleep(100);
            } catch (InterruptedException e) {
                // ignore
                // set the interrupted flag
                Thread.currentThread().interrupt();
            }
        }
    }
@Test
    void testCorrectGroupUsage() {
        when(groupCapacityPersistService.correctUsage(eq("testGroup"), any())).thenReturn(true);
        service.correctGroupUsage("testGroup");
        Mockito.verify(groupCapacityPersistService, times(1)).correctUsage(eq("testGroup"), any());
    }