Fix error in retrieving wms stores
Add test for wms stores/layers