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

    InMemoryDBSelectTask selectTask = new InMemoryDBSelectTask();
    IObject query = new DSObject("{\"collectionName\": \"collection_name\"}");
    IObject criteria = new DSObject("{\"hello\": \"world\"}");
    IAction<IObject[]> callback = mock(IAction.class);
    IFieldName criteriaFieldName = new FieldName("criteria");
    IFieldName callbackFieldName = new FieldName("callback");
    query.setValue(criteriaFieldName, criteria);
    query.setValue(callbackFieldName, callback);
    selectTask.prepare(query);
    selectTask.execute();
    verify(inMemoryDatabase).select(criteria, "collection_name");
    verify(callback).execute(any(IObject[].class));
}