@Test public void when_product_result_repository_returns_empty_list__sechub_execution_is_thrown_with_message() throws Exception { when(productResultRepository.findProductResults(eq(secHubJobUUID), any())).thenReturn(new ArrayList<>()); expected.expect(SecHubExecutionException.class); expected.expectMessage("No report result found for:" + secHubJobUUID); 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);  }