TRUNK-2303: added more test cases and fixed formatting

TRUNK-2303: fixed more formatting