@Test
public void testHandleError_withException() {

	Exception e = new RuntimeException( "hi" );
	Response response = RestServicesUtils.handleError(
			Status.FORBIDDEN,
			new RestError( REST_APP_EXEC_ERROR, e ),
			null ).build();
	StringBuilder expected = new StringBuilder();
	expected.append( "{\"reason\":\"" );
	expected.append( tb.getString( REST_APP_EXEC_ERROR.toString()) );
	expected.append( " Exception Type: java.lang.RuntimeException. Log Reference: " );
	Assert.assertEquals( Status.FORBIDDEN.getStatusCode(), response.getStatus());
	Assert.assertTrue( response.getEntity().toString().startsWith( expected.toString()));
	Assert.assertTrue( response.getEntity().toString().endsWith( "\"}" ));
}