### Question:
FlowService { public List<FlowLogResponse> getFlowLogsByResourceName(String resourceName) { checkState(!Crn.isCrn(resourceName)); LOGGER.info("Getting flow logs by resource name {}", resourceName); List<FlowLog> flowLogs = flowLogDBService.getFlowLogsByResourceCrnOrName(resourceName); 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);  }### Answer:
@Test public void testGetFlowLogsByResourceNameInvalidInput() { thrown.expect(IllegalStateException.class); underTest.getFlowLogsByResourceName(Crn.fromString(STACK_CRN).toString()); }
@Test public void testGetFlowLogsByResourceName() { when(flowLogDBService.getFlowLogsByResourceCrnOrName(anyString())).thenReturn(List.of(new FlowLog())); underTest.getFlowLogsByResourceName("myLittleSdx"); verify(flowLogDBService).getFlowLogsByResourceCrnOrName(anyString()); verify(conversionService).convert(any(), eq(FlowLogResponse.class)); }