add unitests for queryengine.