public static Map<String, String> getStepsMethodsFromFeatureFile(String fileAsString) {
            // A LinkedHashMap is used here to preserve the insertion order, useful to display
            // the steps that will be implemented in the same order that they are written in
            // in the file
            Map<String, String> stepsMethodsBySteps = new LinkedHashMap<String, String>();

            String[] lines = fileAsString.split("\n");
            String lastParsedStepCategory = "";

            for (String line : lines) {

                line = removeSharpComment(line);

                // Ignoring the leading whitespaces / tabulations allows to process
                // indented feature files
                while (line.length() > 0 && (line.charAt(0) == ' ' || line.charAt(0) == '\t')) {
                    line = line.substring(1);
                }

                // If a feature is formatted as a step
                if (isAFeatureStep(line)) {
                    // Then he first word is the category (GIVEN/WHEN/THEN)
                    String stepCategory = line.split(" ")[0];

                    // Special code to treat the 'And' and 'But' steps differently
                    if ((!stepCategory.equals("And") || !stepCategory.equals("But")) || (isRevealAdditionalSteps())){
                        lastParsedStepCategory = stepCategory;
                    }

                    // Generate the annotated method from the step ...
                    String stepMethod = generateStepMethodFromStep(line, lastParsedStepCategory);

                    // ... and add it to the map of generated methods
                    stepsMethodsBySteps.put(StepsFileToolBox.getStepAsString(stepMethod), stepMethod);
                }
            }

            return stepsMethodsBySteps;
        }