@Test    public void testDoProcessing() throws Exception {

    PMode pmode = TestUtils.create1WayReceivePushPMode();        
    Leg leg = pmode.getLeg(Label.REQUEST);
    
    // Turning on duplicate detection
    ReceptionAwarenessConfig rac = new ReceptionAwarenessConfig();
    rac.setDuplicateDetection(true);
    leg.setReceptionAwareness(rac);
    core.getPModeSet().add(pmode);
    // Setting input message property
    UserMessage userMessage = new UserMessage();
    userMessage.setMessageId(UUID.randomUUID().toString());
    userMessage.setPModeId(pmode.getId());
    StorageManager updateManager = HolodeckB2BCore.getStorageManager();
    IUserMessageEntity userMessageEntity = updateManager.storeIncomingMessageUnit(userMessage);
    
    MessageContext mc = new MessageContext();
    mc.setFLOW(MessageContext.IN_FLOW);
    IMessageProcessingContext procCtx = MessageProcessingContext.getFromMessageContext(mc);
    procCtx.setUserMessage(userMessageEntity);
    // Do as if message is already delivered
    updateManager.setProcessingState(userMessageEntity, ProcessingState.DELIVERED);
    // Checking that the message with userMessage id was already delivered
    try {
        Handler.InvocationResponse invokeResp = handler.invoke(mc);
        assertEquals(Handler.InvocationResponse.CONTINUE, invokeResp);
    } catch (Exception e) {
        fail(e.getMessage());
    }
    assertEquals(ProcessingState.DUPLICATE, HolodeckB2BCoreInterface.getQueryManager()
						        		.getMessageUnitsWithId(userMessage.getMessageId())
										.iterator().next().getCurrentProcessingState().getState()); 
}