@Test(expected = MessageProcessorException.class)
public void invoke_functionError() throws Exception {

    SQSMessageProcessorRequest sqsMessageProcessorRequest = new SQSMessageProcessorRequest();
    sqsMessageProcessorRequest.setMessages(MESSAGES);
    InvokeResult invokeResult = mock(InvokeResult.class);
    when(invokeResult.getFunctionError()).thenReturn("Unhandled");
    when(lambda.invoke(any(InvokeRequest.class))).thenReturn(invokeResult);
    messageProcessorProxy.invoke(sqsMessageProcessorRequest);
}