{
@Override
public Object answer(InvocationOnMock invocationOnMock) throws Throwable
{
PhaseResultNotifier phaseResultNotifier = (PhaseResultNotifier) invocationOnMock.getArguments()[2];
phaseResultNotifier.phaseFailure(new DefaultMuleException("error"));
return null;
}
}).when(failureMessageProcessPhase).runPhase(any(MessageProcessTemplate.class), any(MessageProcessContext.class), any(PhaseResultNotifier.class));
return failureMessageProcessPhase;
}