@Test
public void verifyLifecycleOnlyExecutedOnce() throws Exception
{
final MuleEvent event = getTestEvent("authCode");
DefaultHttpCallbackAdapter adapter = new DefaultHttpCallbackAdapter();
adapter.setDomain("localhost");
adapter.setLocalPort(this.localPort.getNumber());
adapter.setRemotePort(this.remotePort.getNumber());
adapter.setPath("/testCallback");
adapter.setConnector(this.httpConnector);
FetchAccessTokenMessageProcessor fetchMessageProcessor = mock(FetchAccessTokenMessageProcessor.class,
RETURNS_DEEP_STUBS);
when(fetchMessageProcessor.process(any(MuleEvent.class))).thenReturn(event);