TRUNK-4389 Fixed tests and formatting