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

    IObject query = mock(IObject.class);
    String collectionName = "examplecn";
    Object document = mock(Object.class);
    when(collectionNameField.in(query)).thenReturn(collectionName);
    when(documentField.in(query)).thenReturn(document);
    IKey upsertTaskKey = mock(IKey.class);
    when(Keys.getOrAdd("db.collection.upsert")).thenReturn(upsertTaskKey);
    when(IOC.resolve(upsertTaskKey, connection, collectionName, document)).thenReturn(targetTask);
    testTask.prepare(query);
    verifyStatic();
    Keys.getOrAdd("db.collection.upsert");
    verify(collectionNameField).in(query);
    verify(documentField).in(query);
    verifyStatic();
    IOC.resolve(upsertTaskKey, connection, collectionName, document);
}