Added BasicQuery and corresponding test