package shouty;

import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;

import static java.util.Collections.emptyList;
import static java.util.Collections.emptyMap;
import static org.junit.Assert.assertEquals;


public class ShoutSteps {
    private static final String ARBITRARY_MESSAGE = "Hello, world";
    private final Shouty shouty = new Shouty();

    @Given("Lucy is at {int}, {int}")
    public void lucy_is_at(int xCoord, int yCoord) throws Throwable {
        shouty.setLocation("Lucy", new Coordinate(xCoord, yCoord));
    }

    @Given("Sean is at {int}, {int}")
    public void sean_is_at(int xCoord, int yCoord) throws Throwable {
        shouty.setLocation("Sean", new Coordinate(xCoord, yCoord));
    }

    @When("Sean shouts")
    public void sean_shouts() throws Throwable {
        shouty.shout("Sean", ARBITRARY_MESSAGE);
    }

    @Then("Lucy should hear Sean")
    public void lucy_should_hear_sean() throws Throwable {
        assertEquals(1, shouty.getShoutsHeardBy("Lucy").size());
    }

    @Then("Lucy should hear nothing")
    public void lucy_should_hear_nothing() throws Throwable {
        assertEquals(emptyMap(), shouty.getShoutsHeardBy("Lucy"));
    }
}

@@ -485,36 +485,19 @@
  yCoord)
- throws Throwable
  %7B%0A
+
         
@@ -651,33 +651,16 @@
  yCoord)
- throws Throwable
  %7B%0A     
@@ -783,33 +783,16 @@
 shouts()
- throws Throwable
  %7B%0A     
@@ -916,33 +916,16 @@
 r_sean()
- throws Throwable
  %7B%0A     
@@ -1029,16 +1029,16 @@
 thing%22)%0A
+
     publ
@@ -1075,25 +1075,8 @@
 ng()
- throws Throwable
  %7B%0A 

Remove Throwable