@Test
public void entity_forExceptionWithCause() throws Exception {
// given
final Exception cause = new Exception("bozfoz");
final Exception exception = new Exception("barfoo", cause);
final RestfulObjectsApplicationException ex = RestfulObjectsApplicationException.createWithCauseAndMessage(HttpStatusCode.BAD_REQUEST, exception, "foobar");
// when
final Response response = exceptionMapper.toResponse(ex);
final String entity = (String) response.getEntity();
assertThat(entity, is(not(nullValue())));