### Question:
MetricEntryCallback implements ProcessorSlotEntryCallback<DefaultNode> { @Override public void onBlocked(BlockException ex, Context context, ResourceWrapper resourceWrapper, DefaultNode param, int count, Object... args) { for (MetricExtension m : MetricExtensionProvider.getMetricExtensions()) { m.addBlock(resourceWrapper.getName(), count, context.getOrigin(), ex, args); } }  @Override void onPass(Context context, ResourceWrapper resourceWrapper, 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 onBlocked() throws Exception { FakeMetricExtension extension = new FakeMetricExtension(); MetricExtensionProvider.addMetricExtension(extension); MetricEntryCallback entryCallback = new MetricEntryCallback(); StringResourceWrapper resourceWrapper = new StringResourceWrapper("resource", EntryType.OUT); Context context = mock(Context.class); when(context.getOrigin()).thenReturn("origin1"); int count = 2; Object[] args = {"args1", "args2"}; entryCallback.onBlocked(new FlowException("xx"), context, resourceWrapper, null, count, args); Assert.assertEquals(extension.block, count); }