Core: Added unit tests for testing the resultSet.
Core: Fixed clear resultSet pollution unit test.