public void uriWithException() throws Exception {
final ODataContext context = mockContext(ODataHttpMethod.GET);
final ODataResponse wrappedResponse = mockResponse(HttpStatusCodes.OK, null, null);
UriInfo uriInfo = mock(UriInfo.class);
FilterExpression filter = mock(FilterExpression.class);
when(filter.getExpressionString()).thenReturn("wrong");
when(uriInfo.getFilter()).thenReturn(filter);
ExpressionParserException exception = mock(ExpressionParserException.class);
when(exception.getMessageReference()).thenReturn(ExpressionParserException.COMMON_ERROR);
when(exception.getStackTrace()).thenReturn(new StackTraceElement[] {
new StackTraceElement("class", "method", "file", 42) });