An interesting story

/path/to/story
Meta:
@author Mauro
@theme testing

Narrative:

In order to renovate my house
As a customer
I want to get a loan

Scenario: I ask for a loan

GivenStories:
/given/story1
/given/story2
Given I have a balance of $50
!-- A comment
When I request $20
When I ask Liz for a loan of $100
When I ask Liz for a loan of $99
When I write special chars <>&"
When I write special chars in parameter <>&"
When I write two parameters ,,, and &&&
Then I should... - try again
Then I should have a balance of $30 (FAILED)
java.lang.Exception: Expected <30> got <25>
	at org.jbehave.core.reporters.StoryNarrator.narrateAnInterestingStory(StoryNarrator.java:58)
	at org.jbehave.core.reporters.TemplateableOutputBehaviour.shouldReportEventsToHtmlOutput(TemplateableOutputBehaviour.java:24)
	(reflection-invoke)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
...
Then I should have $20 (NOT PERFORMED)
Then I don't return loan (FAILED)
org.jbehave.core.model.OutcomesTable$OutcomesFailed
	at org.jbehave.core.model.OutcomesTable.verify(OutcomesTable.java:55)
	at org.jbehave.core.reporters.StoryNarrator.narrateAnInterestingStory(StoryNarrator.java:69)
	at org.jbehave.core.reporters.TemplateableOutputBehaviour.shouldReportEventsToHtmlOutput(TemplateableOutputBehaviour.java:24)
	(reflection-invoke)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
...
Description Value Matcher Verified
I don't return all100<50.0>No
A wrong date01/01/2011"02/01/2011"No
org.jbehave.core.model.OutcomesTable$OutcomesFailed
	at org.jbehave.core.model.OutcomesTable.verify(OutcomesTable.java:55)
	at org.jbehave.core.reporters.StoryNarrator.narrateAnInterestingStory(StoryNarrator.java:69)
	at org.jbehave.core.reporters.TemplateableOutputBehaviour.shouldReportEventsToHtmlOutput(TemplateableOutputBehaviour.java:24)
	(reflection-invoke)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
...

Scenario: Parametrised Scenario

Examples:

Given money <money>
Then I give it to <to>
money to
$30 Mauro
$50 Paul

Example: {money=$30, to=Mauro}

Given money $30
Then I give it to Mauro

Example: {money=$50, to=Paul}

Given money $50
Then I give it to Paul
Then I should have a balance of $30 (FAILED)
java.lang.Exception: Expected <30> got <25>
	at org.jbehave.core.reporters.StoryNarrator.narrateAnInterestingStory(StoryNarrator.java:84)
	at org.jbehave.core.reporters.TemplateableOutputBehaviour.shouldReportEventsToHtmlOutput(TemplateableOutputBehaviour.java:24)
	(reflection-invoke)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
...
STORY CANCELLED (DURATION 2 s)
@When("something \"$param\"")
@Pending
public void whenSomething() {
  // PENDING
}
@Then("something is <param1>")
@Pending
public void thenSomethingIsParam1() {
  // PENDING
}