// Path: greencoffee/src/main/java/com/mauriciotogneri/greencoffee/exceptions/DuplicatedStepDefinitionException.java
// public class DuplicatedStepDefinitionException extends RuntimeException
// {
//     public DuplicatedStepDefinitionException(Method method, String pattern)
//     {
//         super(String.format("Duplicated step definition%n%nClass: %s%nMethod: %s%nPattern: \"%s\"%n", method.getDeclaringClass().getSimpleName(), method.getName(), pattern));
//     }
// }
// 
// Path: greencoffee/src/main/java/com/mauriciotogneri/greencoffee/exceptions/NoStepsDefinedException.java
// public class NoStepsDefinedException extends RuntimeException
// {
//     public NoStepsDefinedException()
//     {
//         super("No steps defined for the feature");
//     }
// }
// 
// Path: greencoffee/src/main/java/com/mauriciotogneri/greencoffee/exceptions/StepDefinitionNotFoundException.java
// public class StepDefinitionNotFoundException extends RuntimeException
// {
//     public StepDefinitionNotFoundException(String keyword, String text)
//     {
//         super(String.format("Step definition not found for: '%s: %s'", keyword, text));
//     }
// }


import com.mauriciotogneri.greencoffee.exceptions.DuplicatedStepDefinitionException;
import com.mauriciotogneri.greencoffee.exceptions.NoStepsDefinedException;
import com.mauriciotogneri.greencoffee.exceptions.StepDefinitionNotFoundException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import static android.support.test.InstrumentationRegistry.getTargetContext;
import gherkin.ast.Node;
import gherkin.ast.Step;
        }
        finally
        {
            afterScenarioEnds(scenarioConfig.scenario(), scenarioConfig.locale());
        }
    }

    private void validateStepDefinitions(List<StepDefinition> stepDefinitions)
    {
        Set<String> patterns = new HashSet<>();

        for (StepDefinition stepDefinition : stepDefinitions)
        {
            String pattern = stepDefinition.pattern();

            if (!patterns.contains(pattern))
            {
                patterns.add(pattern);
            }
            else
            {
                throw new DuplicatedStepDefinitionException(stepDefinition.method(), pattern);
            }
        }
    }

    private void processStep(Step step, List<StepDefinition> stepDefinitions)
    {
        String keyword = step.getKeyword().trim();
        String text = step.getText().trim();
// Path: greencoffee/src/main/java/com/mauriciotogneri/greencoffee/exceptions/DuplicatedStepDefinitionException.java
// public class DuplicatedStepDefinitionException extends RuntimeException
// {
//     public DuplicatedStepDefinitionException(Method method, String pattern)
//     {
//         super(String.format("Duplicated step definition%n%nClass: %s%nMethod: %s%nPattern: \"%s\"%n", method.getDeclaringClass().getSimpleName(), method.getName(), pattern));
//     }
// }
// 
// Path: greencoffee/src/main/java/com/mauriciotogneri/greencoffee/exceptions/NoStepsDefinedException.java
// public class NoStepsDefinedException extends RuntimeException
// {
//     public NoStepsDefinedException()
//     {
//         super("No steps defined for the feature");
//     }
// }
// 
// Path: greencoffee/src/main/java/com/mauriciotogneri/greencoffee/exceptions/StepDefinitionNotFoundException.java
// public class StepDefinitionNotFoundException extends RuntimeException
// {
//     public StepDefinitionNotFoundException(String keyword, String text)
//     {
//         super(String.format("Step definition not found for: '%s: %s'", keyword, text));
//     }
// }


// Path: greencoffee/src/main/java/com/mauriciotogneri/greencoffee/GreenCoffeeTest.java
import com.mauriciotogneri.greencoffee.exceptions.DuplicatedStepDefinitionException;
import com.mauriciotogneri.greencoffee.exceptions.NoStepsDefinedException;
import com.mauriciotogneri.greencoffee.exceptions.StepDefinitionNotFoundException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import static android.support.test.InstrumentationRegistry.getTargetContext;
import gherkin.ast.Node;
import gherkin.ast.Step;

        }
        finally
        {
            afterScenarioEnds(scenarioConfig.scenario(), scenarioConfig.locale());
        }
    }

    private void validateStepDefinitions(List<StepDefinition> stepDefinitions)
    {
        Set<String> patterns = new HashSet<>();

        for (StepDefinition stepDefinition : stepDefinitions)
        {
            String pattern = stepDefinition.pattern();

            if (!patterns.contains(pattern))
            {
                patterns.add(pattern);
            }
            else
            {
                throw new DuplicatedStepDefinitionException(stepDefinition.method(), pattern);
            }
        }
    }

    private void processStep(Step step, List<StepDefinition> stepDefinitions)
    {
        String keyword = step.getKeyword().trim();
        String text = step.getText().trim();
        Node argument = step.getArgument();