TRUNK-2303: added more test cases and fixed formatting
fixed more formatting