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

    IObject query = mock(IObject.class);
    IObject document = mock(IObject.class);
    when(documentField.in(query)).thenReturn(document);
    when(Keys.getOrAdd("db.collection.upsert")).thenThrow(new ResolutionException(""));
    try {
        testTask.prepare(query);
    } catch (TaskPrepareException e) {
        verify(documentField).in(query);
        verify(doneFlagField).out(document, true);
        verifyStatic();
        Keys.getOrAdd("db.collection.upsert");
        return;
    }
    assertTrue(false);
}