Apply Pull Request #29 after a small adapation (mostly: update of the JUnit class + addition of an error message).