added test for empty metadata