small fix for metadata community
add metadata community unit test
Merge pull request #500 from LipuFei/fix-metadata

small fix for metadata community