@Test
public void testDoProcessing() throws Exception {

	PMode pmode = TestUtils.create1WayReceivePushPMode();        
       Leg leg = pmode.getLeg(Label.REQUEST);
       
	DeliveryConfiguration deliverySpecification = new DeliveryConfiguration();
	deliverySpecification.setFactory(NullDeliveryMethod.class.getName());
	deliverySpecification.setId("delivery_spec_id");
	leg.setDefaultDelivery(deliverySpecification);
		
	HolodeckB2BCore.getPModeSet().add(pmode);
	MessageContext mc = new MessageContext();
	mc.setServerSide(true);
	mc.setFLOW(MessageContext.IN_FLOW);
	UserMessage userMessage = new UserMessage();
	userMessage.setMessageId(MessageIdUtils.createMessageId());
	userMessage.setPModeId(pmode.getId());
	StorageManager storageManager = HolodeckB2BCore.getStorageManager();
	IUserMessageEntity umEntity = storageManager.storeIncomingMessageUnit(userMessage);
	storageManager.setProcessingState(umEntity, ProcessingState.READY_FOR_DELIVERY);
	
	IMessageProcessingContext procCtx = MessageProcessingContext.getFromMessageContext(mc);
	procCtx.setUserMessage(umEntity);
	try {
		assertEquals(Handler.InvocationResponse.CONTINUE, new DeliverUserMessage().invoke(mc));
	} catch (Exception e) {
		fail(e.getMessage());
	}
	assertTrue(((NullDeliverer) HolodeckB2BCore.getMessageDeliverer(deliverySpecification))
																		.wasDelivered(userMessage.getMessageId()));
	assertEquals(ProcessingState.DELIVERED, umEntity.getCurrentProcessingState().getState());
	TestEventProcessor eventProc = (TestEventProcessor) HolodeckB2BCoreInterface.getEventProcessor();
	assertTrue(eventProc.events.size() == 1);
	assertTrue(eventProc.events.get(0) instanceof IMessageDelivered);
}