### Question:
FlowCancelService { public void cancelTooOldTerminationFlowForResource(Long stackId, String stackName) { try { flowLogService.cancelTooOldTerminationFlowForResource(stackId, new Date().getTime() - terminationRetryAllowedInMinute * MINUTE_IN_MS); } catch (Exception e) { LOGGER.warn("Can't cancel old termination flows for stack {}", stackName, e); } }  void cancelRunningFlows(Long resourceId); void cancelFlowSilently(FlowLog flowLog); void cancelFlow(FlowLog flowLog); void cancelTooOldTerminationFlowForResource(Long stackId, String stackName);  }### Answer:
@Test public void testCancelTooOldTerminationFlowForResource() { underTest.cancelTooOldTerminationFlowForResource(1L, "asf"); verify(flowLogService, times(1)).cancelTooOldTerminationFlowForResource(eq(1L), anyLong()); }
@Test public void testCancelTooOldTerminationFlowIgnoresExceptions() { doThrow(new RuntimeException()).when(flowLogService).cancelTooOldTerminationFlowForResource(eq(1L), anyLong()); underTest.cancelTooOldTerminationFlowForResource(1L, "asf"); verify(flowLogService, times(1)).cancelTooOldTerminationFlowForResource(eq(1L), anyLong()); }