### Question:
StatisticsHandlerKeyedSize extends AbstractStatisticsHandlerKeyedNumeric implements IMutableStatisticsHandlerKeyedSize { public void addSize (@Nullable final String sKey, @Nonnegative final long nSize) { if (nSize < 0) if (LOGGER.isWarnEnabled ()) LOGGER.warn ("A negative value (" + nSize + ") for key '" + sKey + "' is added to " + getClass ().getName ()); addValue (sKey, nSize); }  void addSize(@Nullable final String sKey, @Nonnegative final long nSize);  }### Answer:
@Test public void testAll () { final StatisticsHandlerKeyedSize sh = new StatisticsHandlerKeyedSize (); assertEquals (0, sh.getInvocationCount ()); assertEquals (CGlobal.ILLEGAL_ULONG, sh.getMin ("key1")); assertEquals (CGlobal.ILLEGAL_ULONG, sh.getMin ("key2")); sh.addSize ("key1", 100); assertEquals (1, sh.getInvocationCount ()); assertEquals (1, sh.getInvocationCount ("key1")); assertEquals (100L, sh.getMin ("key1")); assertEquals (100L, sh.getMax ("key1")); assertEquals (BigInteger.valueOf (100L), sh.getSum ("key1")); assertEquals (100L, sh.getAverage ("key1")); assertEquals (CGlobal.ILLEGAL_UINT, sh.getInvocationCount ("key2")); assertEquals (CGlobal.ILLEGAL_ULONG, sh.getMin ("key2")); assertEquals (CGlobal.ILLEGAL_ULONG, sh.getMax ("key2")); assertNull (sh.getSum ("key2")); assertEquals (CGlobal.ILLEGAL_ULONG, sh.getAverage ("key2")); sh.addSize ("key1", 200L); assertEquals (2, sh.getInvocationCount ()); assertEquals (2, sh.getInvocationCount ("key1")); assertEquals (100L, sh.getMin ("key1")); assertEquals (200L, sh.getMax ("key1")); assertEquals (BigInteger.valueOf (300L), sh.getSum ("key1")); assertEquals (150L, sh.getAverage ("key1")); assertEquals (CGlobal.ILLEGAL_ULONG, sh.getMin ("key2")); sh.addSize ("key2", 1000); assertEquals (3, sh.getInvocationCount ()); assertEquals (2, sh.getInvocationCount ("key1")); assertEquals (100L, sh.getMin ("key1")); assertEquals (200L, sh.getMax ("key1")); assertEquals (BigInteger.valueOf (300L), sh.getSum ("key1")); assertEquals (150L, sh.getAverage ("key1")); assertEquals (1, sh.getInvocationCount ("key2")); assertEquals (1000L, sh.getMin ("key2")); assertEquals (1000L, sh.getMax ("key2")); assertEquals (BigInteger.valueOf (1000L), sh.getSum ("key2")); assertEquals (1000L, sh.getAverage ("key2")); assertEquals (2, sh.getAllKeys ().size ()); }