@Test
public void MustInCorrectPrepareWhenFieldOutThrowException() throws ResolutionException, ReadValueException, InvalidArgumentException, TaskPrepareException, ChangeValueException {

    IObject query = mock(IObject.class);
    IObject queryForNestedTask  = mock(IObject.class);
    IObject filterObject = mock(IObject.class);
    IObject eqKeyObject = mock(IObject.class);
    IKey iObjectKey = mock(IKey.class);
    when(Keys.getOrAdd("info.smart_tools.smartactors.iobject.iobject.IObject")).thenReturn(iObjectKey);
    when(IOC.resolve(iObjectKey)).thenReturn(queryForNestedTask).thenReturn(filterObject).thenReturn(eqKeyObject);
    String token = "token";
    when(tokenField.in(query)).thenReturn(token);
    doThrow(new ChangeValueException()).when(equalsField).out(eqKeyObject, token);
    try {
        testTask.prepare(query);
    } catch (TaskPrepareException e) {
        verifyStatic(times(3));
        Keys.getOrAdd("info.smart_tools.smartactors.iobject.iobject.IObject");
        verifyStatic(times(3));
        IOC.resolve(iObjectKey);
        verify(tokenField).in(query);
        verify(equalsField).out(eqKeyObject, token);
        return;
    }
    assertTrue(false);
}