@Test
public void Should_initializeRecoverStrategyAndCopyFieldsToEntryStateOnInitialization()
        throws Exception {

    CheckpointSchedulerAction action = new CheckpointSchedulerAction();
    IMessageProcessor processorMock = mock(IMessageProcessor.class);
    IObject args = IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.iobject.IObject"),
            ("{'recover':{'strategy':'the recover strategy'}," +
                    "'message':{'a':'1'}," +
                    "'responsibleCheckpointId':'rCP'," +
                    "'prevCheckpointId':'prCP'," +
                    "'prevCheckpointEntryId':'pcpEi'}").replace('\'','"'));
    args.setValue(IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.ifield_name.IFieldName"), "processor"), processorMock);
    action.init(entryMock, args);
    verify(recoverStrategy).init(same(entryState), any(), same(processorMock));
    assertEquals("rCP", entryState.getValue(IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.ifield_name.IFieldName"), "responsibleCheckpointId")));
    assertEquals("prCP", entryState.getValue(IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.ifield_name.IFieldName"), "prevCheckpointId")));
    assertEquals("pcpEi", entryState.getValue(IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.ifield_name.IFieldName"), "prevCheckpointEntryId")));
    assertEquals("the recover strategy", entryState.getValue(IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.ifield_name.IFieldName"), "recoverStrategy")));
    assertEquals("1", ((IObject) entryState.getValue(IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.ifield_name.IFieldName"), "message")))
        .getValue(IOC.resolve(Keys.getOrAdd("info.smart_tools.smartactors.iobject.ifield_name.IFieldName"), "a")));
}