Tests for base classes updated.

Todo: tests for newly refactored query builders.

Todo: tests to ensure that customised query builders and custom blocks work fine.