CntManagerImpl implements CntManager { protected String getCounterEnclosingName(Countable e) { if (e.getClass() != null && e.getClass().getEnclosingClass() != null) { return e.getClass().getEnclosingClass().getName(); } else { return e.getClass().getName(); } }  @Override void i(Countable e); @Override void i(Countable e, long val); @Override void i(String group, String name); @Override void i(String group, String name, long val); @Override long cnt(Countable e); @Override long cnt(String group, String name); @Override Counter getCounter(Countable e); @Override Counter getCounter(String group, String name); @Override Map<String, Long> getCounters(Class<? extends Countable> countableClass); @Override Map<String, Long> getCounters(String group); @SuppressWarnings({"unchecked"}) @Override Map<String, Map<String, Long>> getAllCounters(); @Override Map<String, Long> flattenAllCounters(String separator); @Override synchronized void addMetric(String name, CntsMetric cntsMetric); @Override synchronized void removeMetric(String name); @Override synchronized String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void getCounterEnclosingClass_NoEnclosingClass_shouldWork() throws Exception { assertThat(target.getCounterEnclosingName(TaggingLabels.CITATION_MARKER), is("org.grobid.core.engines.label.TaggingLabelImpl")); }
@Test public void getCounterEnclosingClass_EnclosingClass_sholdWork() throws Exception { assertThat(target.getCounterEnclosingName(FigureCounters.TOO_MANY_FIGURES_PER_PAGE), is("org.grobid.core.engines.counters.FigureCounters")); }