Add view metadata unit test.

Signed-off-by: salomao.marcos <salomao.marcos@gmail.com>