(GitHub #10) Added tests for flatten_object().