Add unittest + fix metadatasource config in web
Add unittest + fix metadatasource config in web