SpectatorCodePointTracker extends CodePointTracker { protected void markReachable(CodePoint codePoint) { if (!marked.containsKey(codePoint)) { if (marked.putIfAbsent(codePoint, createCounter(codePoint)) == null) { markFirst(codePoint); } } marked.get(codePoint).increment(); } SpectatorCodePointTracker(Registry registry);   }
@Test public void testCodePointHit() throws Exception { tracker.markReachable(); tracker.markReachable("request2"); assertThat(tracker.marked).hasSize(2); for (CodePoint first : tracker.marked.keySet()) { assertThat(first.getClassName()).isEqualTo(SpectatorCodePointTrackerTest.class.getName()); assertThat(first.getMethodName()).isEqualTo("testCodePointHit"); } }