BatchEvaluationLoggingDecorator implements BatchEvaluationStrategy<ResourcePoolT>, PerformanceLogger { @Override public void reset() { counter = 0; noNativeProtocols = 0; minNoNativeProtocolsPerBatch = Integer.MAX_VALUE; maxNoNativeProtocolsPerBatch = 0; } BatchEvaluationLoggingDecorator(
      BatchEvaluationStrategy<ResourcePoolT> batchEvaluation); @Override void processBatch(
      ProtocolCollection<ResourcePoolT> protocols, ResourcePoolT resourcePool,
      NetworkBatchDecorator network); @Override void reset(); @Override Map<String, Long> getLoggedValues(); static final String BATCH_COUNTER; static final String BATCH_NATIVE_PROTOCOLS; static final String BATCH_MIN_PROTOCOLS; static final String BATCH_MAX_PROTOCOLS; }
@Test public void reset() { BatchEvaluationLoggingDecorator<ResourcePool> decorator = new BatchEvaluationLoggingDecorator<>(delegate); decorator.processBatch(collection, mock(ResourcePool.class), mock(NetworkBatchDecorator.class)); Assert.assertEquals(1, decorator.getLoggedValues().get("AMOUNT_OF_BATCHES").intValue()); decorator.reset(); Assert.assertEquals(0, decorator.getLoggedValues().get("AMOUNT_OF_BATCHES").intValue()); }