removed unnecessary test() method in DefaultQuery and removed unused imports in Graph.