UC-1990 - removed duplicate code, added javadoc, fixed a test comment