@Test public void when_product_result_repository_returns_only_sereco_report_result__sechubResultFromTransformer_is_returned() throws Exception { SecHubResult secHubResult = new SecHubResult(); ProductResult scanResult = new ProductResult(secHubJobUUID, "project1", ProductIdentifier.SERECO, "scan-result"); when(reportTransformer.canTransform(ProductIdentifier.SERECO)).thenReturn(true); when(reportTransformer.transform(scanResult)).thenReturn(secHubResult); when(productResultRepository.findProductResults(eq(secHubJobUUID), any())) .thenReturn(Arrays.asList(scanResult)); when(resultMerger.merge(null,secHubResult)).thenReturn(secHubResult); SecHubResult result = serviceToTest.createResult(context); assertEquals(secHubResult, result); }
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);  }