@Test public void testGetFlowLogsByResourceCrn() { when(flowLogDBService.getFlowLogsByResourceCrnOrName(anyString())).thenReturn(List.of(new FlowLog())); underTest.getFlowLogsByResourceCrn(Crn.fromString(STACK_CRN).toString()); verify(flowLogDBService).getFlowLogsByResourceCrnOrName(anyString()); verify(conversionService).convert(any(), eq(FlowLogResponse.class)); }
public List<FlowLogResponse> getFlowLogsByResourceCrn(String resourceCrn) { checkState(Crn.isCrn(resourceCrn)); LOGGER.info("Getting flow logs by resource crn {}", resourceCrn); List<FlowLog> flowLogs = flowLogDBService.getFlowLogsByResourceCrnOrName(resourceCrn); return flowLogs.stream().map(flowLog -> conversionService.convert(flowLog, FlowLogResponse.class)).collect(Collectors.toList()); }
FlowService { public List<FlowLogResponse> getFlowLogsByResourceCrn(String resourceCrn) { checkState(Crn.isCrn(resourceCrn)); LOGGER.info("Getting flow logs by resource crn {}", resourceCrn); List<FlowLog> flowLogs = flowLogDBService.getFlowLogsByResourceCrnOrName(resourceCrn); return flowLogs.stream().map(flowLog -> conversionService.convert(flowLog, FlowLogResponse.class)).collect(Collectors.toList()); } }
FlowService { public List<FlowLogResponse> getFlowLogsByResourceCrn(String resourceCrn) { checkState(Crn.isCrn(resourceCrn)); LOGGER.info("Getting flow logs by resource crn {}", resourceCrn); List<FlowLog> flowLogs = flowLogDBService.getFlowLogsByResourceCrnOrName(resourceCrn); return flowLogs.stream().map(flowLog -> conversionService.convert(flowLog, FlowLogResponse.class)).collect(Collectors.toList()); }  }
FlowService { public List<FlowLogResponse> getFlowLogsByResourceCrn(String resourceCrn) { checkState(Crn.isCrn(resourceCrn)); LOGGER.info("Getting flow logs by resource crn {}", resourceCrn); List<FlowLog> flowLogs = flowLogDBService.getFlowLogsByResourceCrnOrName(resourceCrn); return flowLogs.stream().map(flowLog -> conversionService.convert(flowLog, FlowLogResponse.class)).collect(Collectors.toList()); }  FlowLogResponse getLastFlowById(String flowId); List<FlowLogResponse> getFlowLogsByFlowId(String flowId); FlowLogResponse getLastFlowByResourceName(String resourceName); FlowLogResponse getLastFlowByResourceCrn(String resourceCrn); List<FlowLogResponse> getFlowLogsByResourceCrn(String resourceCrn); List<FlowLogResponse> getFlowLogsByResourceName(String resourceName); FlowCheckResponse getFlowChainStateByResourceCrn(String chainId, String resourceCrn); FlowCheckResponse getFlowChainState(String chainId); FlowCheckResponse getFlowChainStateSafe(Long resourceId, String chainId); FlowCheckResponse getFlowState(String flowId); }
FlowService { public List<FlowLogResponse> getFlowLogsByResourceCrn(String resourceCrn) { checkState(Crn.isCrn(resourceCrn)); LOGGER.info("Getting flow logs by resource crn {}", resourceCrn); List<FlowLog> flowLogs = flowLogDBService.getFlowLogsByResourceCrnOrName(resourceCrn); return flowLogs.stream().map(flowLog -> conversionService.convert(flowLog, FlowLogResponse.class)).collect(Collectors.toList()); }  FlowLogResponse getLastFlowById(String flowId); List<FlowLogResponse> getFlowLogsByFlowId(String flowId); FlowLogResponse getLastFlowByResourceName(String resourceName); FlowLogResponse getLastFlowByResourceCrn(String resourceCrn); List<FlowLogResponse> getFlowLogsByResourceCrn(String resourceCrn); List<FlowLogResponse> getFlowLogsByResourceName(String resourceName); FlowCheckResponse getFlowChainStateByResourceCrn(String chainId, String resourceCrn); FlowCheckResponse getFlowChainState(String chainId); FlowCheckResponse getFlowChainStateSafe(Long resourceId, String chainId); FlowCheckResponse getFlowState(String flowId);  }