### Question:
FlowService { public FlowLogResponse getLastFlowByResourceCrn(String resourceCrn) { checkState(Crn.isCrn(resourceCrn)); LOGGER.info("Getting last flow log by resource crn {}", resourceCrn); return conversionService.convert(flowLogDBService.getLastFlowLogByResourceCrnOrName(resourceCrn), FlowLogResponse.class); }  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 testGetLastFlowByResourceCrnInvalidInput() { thrown.expect(IllegalStateException.class); underTest.getLastFlowByResourceCrn("myLittleSdx"); }
@Test public void testGetLastFlowByResourceCrn() { when(flowLogDBService.getLastFlowLogByResourceCrnOrName(anyString())).thenReturn(new FlowLog()); underTest.getLastFlowByResourceCrn(Crn.fromString(STACK_CRN).toString()); verify(flowLogDBService).getLastFlowLogByResourceCrnOrName(anyString()); verify(conversionService).convert(any(), eq(FlowLogResponse.class)); }