CounterSet extends CounterFactory { public long size() { return counters.size(); }  Counter<?, ?> getExistingCounter(CounterName name); @Deprecated Counter<?, ?> getExistingCounter(String name); long size(); List<UpdateT> extractUpdates(
      boolean delta, CounterUpdateExtractor<UpdateT> extractors); List<UpdateT> extractModifiedDeltaUpdates(
      CounterUpdateExtractor<UpdateT> extractors); @Override String toString();  }
@Test public void testAddWithDifferentNamesAddsAll() { Counter<?, ?> c1 = counterSet.longSum(name1); Counter<?, ?> c2 = counterSet.intMax(name2); assertThat(counterSet.size(), equalTo(2L)); }
@Test public void testAddWithAlreadyPresentNameReturnsFalse() { Counter<?, ?> c1 = counterSet.longSum(name1); Counter<?, ?> c1Dup = counterSet.longSum(name1); assertSame(c1, c1Dup); assertThat(counterSet.size(), equalTo(1L)); }