### Question:
StepExternalResourceConsumerListener implements ExtensionPointInterface { protected void addExternalResources( Collection<IExternalResourceInfo> resources, StepInterface step ) { if ( resources != null ) { IExecutionProfile executionProfile = TransLineageHolderMap.getInstance().getLineageHolder( step.getTrans() ).getExecutionProfile(); if ( executionProfile != null ) { String stepName = step.getStepname(); Map<String, List<IExternalResourceInfo>> resourceMap = executionProfile.getExecutionData().getExternalResources(); List<IExternalResourceInfo> externalResources = resourceMap.get( stepName ); if ( externalResources == null ) { externalResources = new LinkedList<IExternalResourceInfo>(); } externalResources.addAll( resources ); resourceMap.put( stepName, externalResources ); } } }  @Override void callExtensionPoint( LogChannelInterface log, Object object ); void setStepExternalResourceConsumerProvider( IStepExternalResourceConsumerProvider provider );  }### Answer:
@Test public void testCallStepAddExternalResources() { StepExternalResourceConsumerListener stepExtensionPoint = new StepExternalResourceConsumerListener(); stepExtensionPoint.addExternalResources( null, null ); StepInterface mockStep = mock( StepInterface.class ); Trans mockTrans = mock( Trans.class ); when( mockStep.getTrans() ).thenReturn( mockTrans ); IExecutionProfile executionProfile = mock( IExecutionProfile.class ); IExecutionData executionData = mock( IExecutionData.class ); when( executionProfile.getExecutionData() ).thenReturn( executionData ); LineageHolder holder = new LineageHolder(); holder.setExecutionProfile( executionProfile ); TransLineageHolderMap.getInstance().putLineageHolder( mockTrans, holder ); Collection<IExternalResourceInfo> externalResources = new ArrayList<IExternalResourceInfo>(); stepExtensionPoint.addExternalResources( externalResources, mockStep ); IExternalResourceInfo externalResource = mock( IExternalResourceInfo.class ); externalResources.add( externalResource ); stepExtensionPoint.addExternalResources( externalResources, mockStep ); }