Javadoc fix.
Simplification.
Added a test class.