@Test public void uris_empty_but_inetadress_filled_when_install_setup_says_no_the_product_executor_calls_the_adapter_parts_and_returns_data() throws Exception{ when(installSetup.isAbleToScan(TargetType.INTRANET)).thenReturn(false); assertTrue(urisForTarget.isEmpty()); inetAdressesForTarget.add(IP_ADRESS1); List<ProductResult> result = executorToTest.execute(context,executorContext); assertEquals(0,executorToTest.adapterExecutionCallAmount); assertNotNull(result); assertTrue(result.isEmpty()); }
@Override public final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ) throws SecHubExecutionException { UUIDTraceLogID traceLogId = context.getTraceLogId(); LOG.debug("Executing {}", traceLogId); SecHubConfiguration config = context.getConfiguration(); S setup = getInstallSetup(); TargetRegistry registry = createTargetRegistry(); List<URI> uris = resolveURIsForTarget(config); registerURIs(traceLogId, setup, registry, uris); List<InetAddress> inetAdresses = resolveInetAdressForTarget(config); registerInetAdresses(traceLogId, setup, registry, inetAdresses); customRegistration(traceLogId, setup, registry, config); try { return execute(context, executorContext, registry, setup); } catch (SecHubExecutionException e) { throw e; } catch (Exception e) { throw new SecHubExecutionException(getIdentifier() + " execution failed." + traceLogId, e); } }
AbstractInstallSetupProductExecutor implements ProductExecutor { @Override public final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ) throws SecHubExecutionException { UUIDTraceLogID traceLogId = context.getTraceLogId(); LOG.debug("Executing {}", traceLogId); SecHubConfiguration config = context.getConfiguration(); S setup = getInstallSetup(); TargetRegistry registry = createTargetRegistry(); List<URI> uris = resolveURIsForTarget(config); registerURIs(traceLogId, setup, registry, uris); List<InetAddress> inetAdresses = resolveInetAdressForTarget(config); registerInetAdresses(traceLogId, setup, registry, inetAdresses); customRegistration(traceLogId, setup, registry, config); try { return execute(context, executorContext, registry, setup); } catch (SecHubExecutionException e) { throw e; } catch (Exception e) { throw new SecHubExecutionException(getIdentifier() + " execution failed." + traceLogId, e); } } }
AbstractInstallSetupProductExecutor implements ProductExecutor { @Override public final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ) throws SecHubExecutionException { UUIDTraceLogID traceLogId = context.getTraceLogId(); LOG.debug("Executing {}", traceLogId); SecHubConfiguration config = context.getConfiguration(); S setup = getInstallSetup(); TargetRegistry registry = createTargetRegistry(); List<URI> uris = resolveURIsForTarget(config); registerURIs(traceLogId, setup, registry, uris); List<InetAddress> inetAdresses = resolveInetAdressForTarget(config); registerInetAdresses(traceLogId, setup, registry, inetAdresses); customRegistration(traceLogId, setup, registry, config); try { return execute(context, executorContext, registry, setup); } catch (SecHubExecutionException e) { throw e; } catch (Exception e) { throw new SecHubExecutionException(getIdentifier() + " execution failed." + traceLogId, e); } }  }
AbstractInstallSetupProductExecutor implements ProductExecutor { @Override public final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ) throws SecHubExecutionException { UUIDTraceLogID traceLogId = context.getTraceLogId(); LOG.debug("Executing {}", traceLogId); SecHubConfiguration config = context.getConfiguration(); S setup = getInstallSetup(); TargetRegistry registry = createTargetRegistry(); List<URI> uris = resolveURIsForTarget(config); registerURIs(traceLogId, setup, registry, uris); List<InetAddress> inetAdresses = resolveInetAdressForTarget(config); registerInetAdresses(traceLogId, setup, registry, inetAdresses); customRegistration(traceLogId, setup, registry, config); try { return execute(context, executorContext, registry, setup); } catch (SecHubExecutionException e) { throw e; } catch (Exception e) { throw new SecHubExecutionException(getIdentifier() + " execution failed." + traceLogId, e); } }  @Override final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ); }
AbstractInstallSetupProductExecutor implements ProductExecutor { @Override public final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext ) throws SecHubExecutionException { UUIDTraceLogID traceLogId = context.getTraceLogId(); LOG.debug("Executing {}", traceLogId); SecHubConfiguration config = context.getConfiguration(); S setup = getInstallSetup(); TargetRegistry registry = createTargetRegistry(); List<URI> uris = resolveURIsForTarget(config); registerURIs(traceLogId, setup, registry, uris); List<InetAddress> inetAdresses = resolveInetAdressForTarget(config); registerInetAdresses(traceLogId, setup, registry, inetAdresses); customRegistration(traceLogId, setup, registry, config); try { return execute(context, executorContext, registry, setup); } catch (SecHubExecutionException e) { throw e; } catch (Exception e) { throw new SecHubExecutionException(getIdentifier() + " execution failed." + traceLogId, e); } }  @Override final List<ProductResult> execute(SecHubExecutionContext context, ProductExecutorContext executorContext );  }