@Test
public void testToString_expected() {

  expect(error.getFailureMessage()).andReturn(null).atLeastOnce();
  expect(error.getExpected()).andReturn(Arrays.asList("foo", "bar")).atLeastOnce();
  expect(error.getEncountered()).andReturn("baz");
  replay();
  assertEquals("line 3, column 5:\nfoo or bar expected, baz encountered."
      , ErrorReporter.toString(error, new Location(3, 5)));
}