class HandlebarsException extends RuntimeException {

  public HandlebarsError getError() {
    return error;
  }

}

class HandlebarsExceptionTest {

  @Test
  public void withError() {

    HandlebarsError error = createMock(HandlebarsError.class);
    HandlebarsException ex = new HandlebarsException(error);
    assertEquals(error, ex.getError());
  }

}