@Test
public void reset() {

  Binary binary = mock(Binary.class);
  when(binary.xor(any(DRes.class), any(DRes.class))).thenReturn(mock(DRes.class));
  when(binary.and(any(DRes.class), any(DRes.class))).thenReturn(mock(DRes.class));
  BinaryLoggingDecorator decorator = new BinaryLoggingDecorator(binary);
  decorator.xor(mock(DRes.class), mock(DRes.class));
  decorator.and(mock(DRes.class), mock(DRes.class));
  Assert.assertEquals(decorator.getLoggedValues().get("XOR_COUNT").intValue(), 1);
  Assert.assertEquals(decorator.getLoggedValues().get("AND_COUNT").intValue(), 1);
  decorator.reset();
  Assert.assertEquals(decorator.getLoggedValues().get("XOR_COUNT").intValue(), 0);
  Assert.assertEquals(decorator.getLoggedValues().get("AND_COUNT").intValue(), 0);
}