Add a unit test

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1627603 13f79535-47bb-0310-9956-ffa450edef68
Add docs

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1627604 13f79535-47bb-0310-9956-ffa450edef68
Docs

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1627605 13f79535-47bb-0310-9956-ffa450edef68
More docs.
Code updates after review while writing docs

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1627606 13f79535-47bb-0310-9956-ffa450edef68