### Question:
JobEntryExternalResourceConsumerListener implements ExtensionPointInterface { protected void addExternalResources( Collection<IExternalResourceInfo> resources, JobEntryInterface jobEntry ) { if ( resources != null ) { IExecutionProfile executionProfile = JobLineageHolderMap.getInstance().getLineageHolder( jobEntry.getParentJob() ).getExecutionProfile(); if ( executionProfile != null ) { String jobEntryName = jobEntry.getName(); Map<String, List<IExternalResourceInfo>> resourceMap = executionProfile.getExecutionData().getExternalResources(); List<IExternalResourceInfo> externalResources = resourceMap.get( jobEntryName ); if ( externalResources == null ) { externalResources = new LinkedList<IExternalResourceInfo>(); } externalResources.addAll( resources ); resourceMap.put( jobEntryName, externalResources ); } } }  @Override void callExtensionPoint( LogChannelInterface log, Object object ); void setJobEntryExternalResourceConsumerProvider( IJobEntryExternalResourceConsumerProvider provider );  }### Answer:
@Test public void testCallJobEntryAddExternalResources() { JobEntryExternalResourceConsumerListener stepExtensionPoint = new JobEntryExternalResourceConsumerListener(); stepExtensionPoint.addExternalResources( null, null ); JobEntryInterface mockJobEntry = mock( JobEntryInterface.class ); Job mockJob = mock( Job.class ); when( mockJobEntry.getParentJob() ).thenReturn( mockJob ); IExecutionProfile executionProfile = mock( IExecutionProfile.class ); IExecutionData executionData = mock( IExecutionData.class ); when( executionProfile.getExecutionData() ).thenReturn( executionData ); JobLineageHolderMap.getInstance().getLineageHolder( mockJob ).setExecutionProfile( executionProfile ); Collection<IExternalResourceInfo> externalResources = new ArrayList<IExternalResourceInfo>(); stepExtensionPoint.addExternalResources( externalResources, mockJobEntry ); IExternalResourceInfo externalResource = mock( IExternalResourceInfo.class ); externalResources.add( externalResource ); stepExtensionPoint.addExternalResources( externalResources, mockJobEntry ); }