add tests for getFirstObject & getLastObject