@Test
public void withErrorCause() {

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