Adding functional test for OutputFormatter.
Addressing some PR comments.