fixes #2650
changed the exception type
added JavaDoc
Fix #2648 : npe on startup
Changed the exception from IllegalState to IllegalArgument
Added test category/runner