GeoServerResourceLoader rl = this.geoServer.getCatalog().getResourceLoader();
Resource d = rl.get("workspaces/foo/styles");
assertEquals( d.getType(), Type.DIRECTORY );
assertEquals( 3, d.list().size() );
MvcResult result = mvc.perform(get("/api/icons/foo"))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
JSONArr arr = JSONWrapper.read(result.getResponse().getContentAsString()).toArray();
assertEquals( 2, arr.size() );
for( Iterator<Object> i = arr.iterator(); i.hasNext();){
Object item = i.next();
if( item instanceof JSONObj){
JSONObj obj = (JSONObj) item;