### Question:
NessusProductExecutor extends AbstractInfrastructureScanProductExecutor<NessusInstallSetup> { @Override protected List<InetAddress> resolveInetAdressForTarget(SecHubConfiguration config) { if (config==null) { return Collections.emptyList(); } Optional<SecHubInfrastructureScanConfiguration> infraScan = config.getInfraScan(); if (! infraScan.isPresent()) { return Collections.emptyList(); } return infraScan.get().getIps(); }  @Override ProductIdentifier getIdentifier();  }### Answer:
@Test public void nessus_resolves_ip_from_infrascan() throws Exception{ SecHubInfrastructureScanConfiguration infraScan = mock(SecHubInfrastructureScanConfiguration.class); List<InetAddress> expectedIPList = new ArrayList<>(); when(infraScan.getIps()).thenReturn(expectedIPList); when(config.getInfraScan()).thenReturn(Optional.of(infraScan)); List<InetAddress> result = executorToTest.resolveInetAdressForTarget(config); assertEquals(expectedIPList,result); }