INT-3384: format code and change Test assert Exception behavior