@Test
public void testExecute() throws InvalidArgumentException, ChangeValueException, TaskPrepareException, TaskExecutionException, IDatabaseException {

    InMemoryDBUpsertTask upsertTask = new InMemoryDBUpsertTask();
    IObject query = new DSObject("{\"collectionName\": \"collection_name\"}");
    IObject document = new DSObject("{\"hello\": \"world\"}");
    IFieldName documentFieldName = new FieldName("document");
    query.setValue(documentFieldName, document);
    upsertTask.prepare(query);
    upsertTask.execute();
    verify(inMemoryDatabase).upsert(document, "collection_name");
}