DDBNEXT-557: Add JavaDoc and refactor tests.
DDBNEXT-557: remove unused code