refactor TestResultSet and add example