@Test
public void invokeUserDefinedExceptionHandlerTest() throws Exception {

    TestActionWithExceptionHandler action = new TestActionWithExceptionHandler();
    AwsProxyResponse res = resolver.handleException(
            new TestActionWithExceptionHandler.HandledException("test exception"),
            action, mockContext);
    assertEquals(503, res.getStatusCode());
    assertThat(res.getHeaders(), hasEntry(CONTENT_TYPE, APPLICATION_JSON));
    TestErrorBody actual = JsonUtils.readValue(res.getBody(), TestErrorBody.class);
    assertEquals("Test Error test exception", actual.error);
    assertEquals("Test descrption", actual.description);
    assertFalse(res.isBase64Encoded());
}