Bug 19859: Add unit test for formatting