title: cucumber.runtime.CucumberException: Not a Map or List type
body: <p>If I am using a data inside the Data Table which is not type of List or Map then it is giving me error</p>
  
  <p><code>cucumber.runtime.CucumberException: Not a Map or List type</code></p>
  
  <p>This is how I am testing this. I am testing it bottom to top i.e. write function > then write step def > write feature file (just for testing purpose).</p>
  
  <p><strong>java function:</strong></p>
  
  <pre><code>public String getScenarioName(Scenario scenario) {
          System.out.println("scenario.getName().toString());
      }
  </code></pre>
  
  <p><strong>step def:</strong></p>
  
  <pre><code>@And("^Get current scenario name$")
      public void get_current_scenario_name(Scenario scenario) {
          System.out.println(getScenarioName(scenario));
      }
  </code></pre>
  
  <p><strong>Feature file:</strong></p>
  
  <pre><code>  Scenario: Title of your scenario
      Given I have a scenario
      Then Get current scenario name
        |scenario|
  </code></pre>
  
  <p>Since I'm using <code>Scenario</code> interface as a parameter I have to use it across, in function, in steps and in feature file.</p>
  
  <p><em>Note: Please don't judge by the weird scenario, I am only testing it.</em></p>
  
  <p>I have gone through below links, but it doesn't help me. It keep giving me same error.</p>
  
  <p><a href="https://github.com/cucumber/cucumber-jvm/issues/741" rel="nofollow noreferrer">https://github.com/cucumber/cucumber-jvm/issues/741</a></p>
  
  <p><a href="http://grasshopper.tech/340/" rel="nofollow noreferrer">http://grasshopper.tech/340/</a> >> this one I couldn't implement, didn't quiet understand it. </p>