Closing brace bug fixed. Added several tests.

 #KT-5544 Fixed
Constant strings for tokens.

Minor: refactoring, java code conventions
Configure editor for tests: use os line separators