public @NonNull SingleTokenStats updateUsageForId(@NonNull String tokenUuid) {
        if (areStatsDisabled()) {
            return new SingleTokenStats(tokenUuid);
        }

        return updateUsageForIdIfNeeded(tokenUuid);
    }
@Test
    public void testDayDifference() throws Exception {
        final String ID = UUID.randomUUID().toString();
        ApiTokenPropertyConfiguration mockConfig = mock(ApiTokenPropertyConfiguration.class);
        try (MockedStatic<ApiTokenPropertyConfiguration> mocked = mockStatic(ApiTokenPropertyConfiguration.class)) {
            mocked.when(ApiTokenPropertyConfiguration::get).thenReturn(mockConfig);
            Mockito.when(mockConfig.isUsageStatisticsEnabled()).thenReturn(true);
            ApiTokenStats tokenStats = createFromFile(tmp.getRoot());
            ApiTokenStats.SingleTokenStats stats = tokenStats.updateUsageForId(ID);
            assertThat(stats.getNumDaysUse(), lessThan(1L));

            Field field = ApiTokenStats.SingleTokenStats.class.getDeclaredField("lastUseDate");
            field.setAccessible(true);
            field.set(stats, new Date(
                            new Date().toInstant()
                                    .minus(2, ChronoUnit.DAYS)
                                    // to ensure we have more than 2 days
                                    .minus(5, ChronoUnit.MINUTES)
                                    .toEpochMilli()
                    )
            );

            assertThat(stats.getNumDaysUse(), greaterThanOrEqualTo(2L));
        }
    }