implementing test based on refactor
Javadocs