Added unit test for embedded newlines in used with text serialisation