HandlebarsException extends RuntimeException { public HandlebarsError getError() { return error; } HandlebarsException(final HandlebarsError error);  HandlebarsException(final Throwable cause);  HandlebarsException(final HandlebarsError error,
      final Throwable cause);  HandlebarsException(final String message, final Throwable cause); HandlebarsError getError();  }
@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()); }
@Test public void withError() { HandlebarsError error = createMock(HandlebarsError.class); HandlebarsException ex = new HandlebarsException(error); assertEquals(error, ex.getError()); }