title: Very simple step by step JBehave setup tutorial?
body: <p>Though I have read many, but many articles on how to use JBehave, I can't get it to work. Here are the steps I went through so far:</p>
  
  <ol>
  <li>Created new Java Project</li>
  <li>Downloaded JBehave JAR file version 3.6.8 and added it to my build path libraries</li>
  <li>Created a package called <code>com.wmi.tutorials.bdd.stack.specs</code> under the test source folder in my workspace</li>
  <li>Added the JBehave JAR file to my Build path Library configuration</li>
  <li>Created a JBehave story in the above-mentioned package (StackBehaviourStories.story)</li>
  <li>Created a Java class in the above-mentioned package (StackBehaviourStory.java)</li>
  <li>Created a Java class in the above-mentioned package (StackBehaviourSteps.java)</li>
  <li>Imported the Given, Named, Then, When annotations in my Java class</li>
  <li>Written two different scenarios in my JBehave story file</li>
  </ol>
  
  <p>And still, I can't get it to work/run! =(</p>
  
  <blockquote>
    <p><strong>The story file:</strong></p>
  </blockquote>
  
  <pre><code>Narrative:
  In order to learn to with JBehave using Eclipse
  As a junior Java developer though senior in .Net and in BDD
  I want to define the behaviour of a custom stack
  
  Scenario: I push an item onto the stack
  Given I have an empty stack
  When  I push an item 'orange'
  Then  I should count 1
  
  Scenario: I pop from the stack
  Given I have an empty stack
  When  I push an item 'apple'
  And   I pop the stack
  Then  I should count 0
  </code></pre>
  
  <blockquote>
    <p><strong>The story class</strong></p>
  </blockquote>
  
  <pre><code>package com.wmi.tutorials.bdd.stack.specs
  
  import org.jbehave.core.configuration.MostUsefulConfiguration;
  import org.jbehave.core.junit.JUnitStory;
  
  public class StackBehaviourStory extends JUnitStory {
      @Override 
      public Configuration configuration() { return new MostUsefulConfiguration(); }
  
      @Override
      public InjectableStepsFactory stepsFactory() {
          return new InstanceStepsFactory(configuration()
                                        , new StackBehaviourSteps());   
      }
  }
  </code></pre>
  
  <blockquote>
    <p><strong>The steps class</strong></p>
  </blockquote>
  
  <pre><code>package com.wmi.tutorials.bdd.stack.specs
  
  import org.jbehave.core.annotations.Given;
  import org.jbehave.core.annotations.Named;
  import org.jbehave.core.annotations.Then;
  import org.jbehave.core.annotations.When;
  import org.jbehave.core.junit.Assert;
  
  public class StackBehaviourSteps {
      @Given("I have an empty stack")
      public void givenIHaveAnEmptyStack() { stack = new CustomStack(); }
  
      @When("I push an item $item")
      public void whenIPushAnItem(@Named("item") String item) { stack.push(item); }
  
      @Then("I should count $expected")
      public void thenIShouldCount(@Named("expected") int expected) {
          int actual = stack.count();
          if (actual != expected) 
              throw new RuntimeException("expected:"+expected+";actual:"+actual);
      }
  }
  </code></pre>
  
  <p>I'm currently using Eclipse Kepler (4.3) JEE with everything I need to use JUnit, Google App Engine, and yes, JBehave is installed correctly following the Eclipse JBehave installation tutorial.</p>
  
  <p>I can't get it to work. So how can I make it work correctly using Eclipse, JBehave and JUnit?</p>