Unit test for get flattened view