added example to javadoc, splitted test