public static String getIndexedScenarioMessage(String assertionError, int index, String scenarioDescription, String fileName) {
        StringBuilder message = new StringBuilder().append("#").append(index);
        if (scenarioDescription != null && !scenarioDescription.isEmpty()) {
            message.append(" ").append(scenarioDescription);
        }
        message.append(": ").append(assertionError);
        if (fileName != null) {
            message.append(" (").append(fileName).append(")");
        }
        return message.toString();
    }
@Test
    public void getIndexedScenarioMessage_manyCases() {
        String failureMessage = "Failure message";
        String scenarioDescription = "First Case";
        String fileName = "ScesimTest";
        
        String testResult = getIndexedScenarioMessage(failureMessage, 1, scenarioDescription, fileName);
        assertThat(testResult).isEqualTo("#1 First Case: Failure message (ScesimTest)");
        
        testResult = getIndexedScenarioMessage(failureMessage, 1, scenarioDescription, null);
        assertThat(testResult).isEqualTo("#1 First Case: Failure message");
        
        testResult = getIndexedScenarioMessage(failureMessage, 1, "", fileName);
        assertThat(testResult).isEqualTo("#1: Failure message (ScesimTest)");
        
        testResult = getIndexedScenarioMessage(failureMessage, 1, null, fileName);
        assertThat(testResult).isEqualTo("#1: Failure message (ScesimTest)");
    }