@Override
    protected void reportTracedLeak(String resourceType, String records) {
        super.reportTracedLeak(resourceType, records);
        leakCounter.incrementAndGet();
        resetReportedLeaks();
    }
@Test
    void test() {
        leakDetector.reportTracedLeak("test", "test");
        assertEquals(1, leakDetector.leakCounter.get());

        leakDetector.reportTracedLeak("test", "test");
        assertEquals(2, leakDetector.leakCounter.get());

        leakDetector.reportTracedLeak("test", "test");
        assertEquals(3, leakDetector.leakCounter.get());
    }