@Test public void when_product_result_repository_returns_only_netsparker_result__sechub_execution_is_thrown_with_message() throws Exception { ProductResult scanResult = new ProductResult(secHubJobUUID, "project1", ProductIdentifier.NETSPARKER, "scan-result"); when(productResultRepository.findProductResults(eq(secHubJobUUID), any())) .thenReturn(Arrays.asList(scanResult)); expected.expect(SecHubExecutionException.class); serviceToTest.createResult(context); }
public SecHubResult createResult(SecHubExecutionContext context) throws SecHubExecutionException { notNull(context, "Context may not be null!"); UUID secHubJobUUID = context.getSechubJobUUID(); return createResult(secHubJobUUID); }
SecHubResultService { public SecHubResult createResult(SecHubExecutionContext context) throws SecHubExecutionException { notNull(context, "Context may not be null!"); UUID secHubJobUUID = context.getSechubJobUUID(); return createResult(secHubJobUUID); } }
SecHubResultService { public SecHubResult createResult(SecHubExecutionContext context) throws SecHubExecutionException { notNull(context, "Context may not be null!"); UUID secHubJobUUID = context.getSechubJobUUID(); return createResult(secHubJobUUID); }  }
SecHubResultService { public SecHubResult createResult(SecHubExecutionContext context) throws SecHubExecutionException { notNull(context, "Context may not be null!"); UUID secHubJobUUID = context.getSechubJobUUID(); return createResult(secHubJobUUID); }  SecHubResult createResult(SecHubExecutionContext context); SecHubResult createResult(UUID secHubJobUUID); }
SecHubResultService { public SecHubResult createResult(SecHubExecutionContext context) throws SecHubExecutionException { notNull(context, "Context may not be null!"); UUID secHubJobUUID = context.getSechubJobUUID(); return createResult(secHubJobUUID); }  SecHubResult createResult(SecHubExecutionContext context); SecHubResult createResult(UUID secHubJobUUID);  }