@Override
  public void onWorkflowTerminated(Workflow workflow) {
    LOG.trace(
        "Workflow {} is terminated with status {}", workflow.getWorkflowId(), workflow.getStatus());
    metrics.counter(
        MetricConstants.WORKFLOW_STATUS_LISTENER_CALL_BACK_METRIC,
        getClass(),
        TYPE_TAG,
        "onWorkflowTerminated",
        MetricConstants.STATUS_TAG,
        workflow.getStatus().name());
  }
@Test
  public void testWorkflowTimedOut() {
    when(workflow.getStatus()).thenReturn(Workflow.WorkflowStatus.TIMED_OUT);
    statusListener.onWorkflowTerminated(workflow);
    Assert.assertEquals(
        1L,
        metricRepo
            .getCounter(
                MetricConstants.WORKFLOW_STATUS_LISTENER_CALL_BACK_METRIC,
                MaestroWorkflowStatusListener.class,
                "type",
                "onWorkflowTerminated",
                "status",
                "TIMED_OUT")
            .count());
  }