### Question:
NumericLoggingDecorator implements Numeric, PerformanceLogger { @Override public void reset() { this.multCount = 0; this.addCount = 0; this.subCount = 0; this.bitCount = 0; this.randElmCount = 0; } NumericLoggingDecorator(Numeric delegate); @Override DRes<SInt> add(DRes<SInt> a, DRes<SInt> b); @Override DRes<SInt> add(BigInteger a, DRes<SInt> b); @Override DRes<SInt> sub(DRes<SInt> a, DRes<SInt> b); @Override DRes<SInt> sub(BigInteger a, DRes<SInt> b); @Override DRes<SInt> sub(DRes<SInt> a, BigInteger b); @Override DRes<SInt> mult(DRes<SInt> a, DRes<SInt> b); @Override DRes<SInt> mult(BigInteger a, DRes<SInt> b); @Override DRes<SInt> randomBit(); @Override DRes<SInt> randomElement(); @Override DRes<SInt> known(BigInteger value); @Override DRes<SInt> input(BigInteger value, int inputParty); @Override DRes<BigInteger> open(DRes<SInt> secretShare); @Override DRes<BigInteger> open(DRes<SInt> secretShare, int outputParty); @Override void reset(); @Override Map<String, Long> getLoggedValues(); static final String ARITHMETIC_BASIC_MULT; static final String ARITHMETIC_BASIC_ADD; static final String ARITHMETIC_BASIC_SUB; static final String ARITHMETIC_BASIC_BIT; static final String ARITHMETIC_BASIC_RAND; }### Answer:
@Test public void reset() { DRes<SInt> firstArgument = mock(DRes.class); DRes<SInt> secondArgument = mock(DRes.class); decorator.mult(firstArgument, secondArgument); decorator.add(firstArgument, secondArgument); decorator.sub(firstArgument, secondArgument); decorator.randomBit(); decorator.randomElement(); Assert.assertEquals(decorator.getLoggedValues().get("MULT_COUNT").intValue(), 1); Assert.assertEquals(decorator.getLoggedValues().get("ADD_COUNT").intValue(), 1); Assert.assertEquals(decorator.getLoggedValues().get("SUB_COUNT").intValue(), 1); Assert.assertEquals(decorator.getLoggedValues().get("BIT_COUNT").intValue(), 1); Assert.assertEquals(decorator.getLoggedValues().get("RANDOM_ELEMENT_COUNT").intValue(), 1); decorator.reset(); Assert.assertEquals(decorator.getLoggedValues().get("MULT_COUNT").intValue(), 0); Assert.assertEquals(decorator.getLoggedValues().get("ADD_COUNT").intValue(), 0); Assert.assertEquals(decorator.getLoggedValues().get("SUB_COUNT").intValue(), 0); Assert.assertEquals(decorator.getLoggedValues().get("BIT_COUNT").intValue(), 0); Assert.assertEquals(decorator.getLoggedValues().get("RANDOM_ELEMENT_COUNT").intValue(), 0); }