void (CucumberJvmTestStepFinishedEvent event) { if (event.getResult() == CucumberJvmTestStepFinishedEvent.Status.PASSED) { // write nothing } else if (event.getResult() == CucumberJvmTestStepFinishedEvent.Status.SKIPPED || event.getResult() == CucumberJvmTestStepFinishedEvent.Status.PENDING) { outCommand(TEMPLATE_TEST_PENDING, event.getTestStep().getStepName(), getCurrentTime()); } else { String[] messageAndDetails = getMessageAndDetails(event.getErrorMessage()); ComparisonFailureData comparisonFailureData = ExpectedPatterns.createExceptionNotification(messageAndDetails[0]); if (comparisonFailureData != null) { outCommand(TEMPLATE_COMPARISON_TEST_FAILED, getCurrentTime(), messageAndDetails[1], messageAndDetails[0], comparisonFailureData.getExpected(), comparisonFailureData.getActual(), event.getTestStep().getStepName(), ""); } else { outCommand(TEMPLATE_TEST_FAILED, getCurrentTime(), "", event.getErrorMessage(), event.getTestStep().getStepName(), ""); } } outCommand(TEMPLATE_TEST_FINISHED, getCurrentTime(), String.valueOf(event.getDuration()), event.getTestStep().getStepName()); }