@Override
  protected void setUp() throws Exception {
    super.setUp();
    myFixture.allowTreeAccessForAllFiles();

    CucumberStepsIndex.getInstance(getProject()).reset();
    myFixture.enableInspections(new CucumberStepInspection());
    myFixture.copyDirectoryToProject(getTestName(true), "");
    myFixture.configureByFile(getTestName(true) + "/test.feature");
  }
  private void doTestDeletion(
      @NotNull final String folder,
      @NotNull final String step,
      @NotNull final String stepDefinitionName)
      throws IOException {
    init(folder);

    checkReference(step, stepDefinitionName);
    deleteStepDefinition(stepDefinitionName);
    CucumberStepsIndex.getInstance(getProject()).flush();
    checkReference(step, null);
  }
  @Override
  public List<PsiElement> resolveStep(@NotNull final PsiElement element) {
    final CucumberStepsIndex index = CucumberStepsIndex.getInstance(element.getProject());

    if (element instanceof GherkinStep) {
      final GherkinStep step = (GherkinStep) element;
      final List<PsiElement> result = new ArrayList<PsiElement>();
      final Set<String> substitutedNameList = step.getSubstitutedNameList();
      if (substitutedNameList.size() > 0) {
        for (String s : substitutedNameList) {
          final AbstractStepDefinition definition =
              index.findStepDefinition(element.getContainingFile(), s);
          if (definition != null) {
            result.add(definition.getElement());
          }
        }
        return result;
      }
    }

    return new ArrayList<PsiElement>();
  }