### Question:
MetricEntryCallback implements ProcessorSlotEntryCallback<DefaultNode> { @Override public void onPass(Context context, ResourceWrapper rw, DefaultNode param, int count, Object... args) throws Exception { for (MetricExtension m : MetricExtensionProvider.getMetricExtensions()) { if (m instanceof AdvancedMetricExtension) { ((AdvancedMetricExtension) m).onPass(rw, count, args); } else { m.increaseThreadNum(rw.getName(), args); m.addPass(rw.getName(), count, args); } } }  @Override void onPass(Context context, ResourceWrapper rw, DefaultNode param, int count, Object... args); @Override void onBlocked(BlockException ex, Context context, ResourceWrapper resourceWrapper, DefaultNode param,
                          int count, Object... args);  }### Answer:
@Test public void onPass() throws Exception { FakeMetricExtension extension = new FakeMetricExtension(); FakeAdvancedMetricExtension advancedExtension = new FakeAdvancedMetricExtension(); MetricExtensionProvider.addMetricExtension(extension); MetricExtensionProvider.addMetricExtension(advancedExtension); MetricEntryCallback entryCallback = new MetricEntryCallback(); StringResourceWrapper resourceWrapper = new StringResourceWrapper("resource", EntryType.OUT); int count = 2; Object[] args = {"args1", "args2"}; entryCallback.onPass(null, resourceWrapper, null, count, args); Assert.assertEquals(extension.pass, count); Assert.assertEquals(extension.thread, 1); Assert.assertEquals(advancedExtension.pass, count); Assert.assertEquals(advancedExtension.concurrency, 1); }