Removed unnecessary instanceof check.
Added Javadoc to test case with a link to the pull request.