add test for utility class and adapted implementation
improved tests, implementation and some javadoc (not much)