Removed unused imports.
Reverted initializing StringState strings to empty string.
Improved error messages in InvalidStateException + moved test classes to package testgen.
Minor modification of test.
Added asStringState() to immutable state.
Return not only Object but the correct type.
Removed empty line.
Removed comment.
Suffix method parameters with _ if needed.