"foo"), Predicates.fullTextSearch("o"))), isA(Integer.class), isA(Integer.class), isA(SortBy.class))).thenAnswer(a);
when(catalog.count(eq(LayerInfo.class), eq(Predicates.and(Predicates.equal("resource.namespace.prefix",
"foo"), Predicates.fullTextSearch(""))))).thenReturn(layers.size());
MvcResult result = mvc.perform(get("/api/layers/foo"))
.andExpect(status().isOk())
.andExpect(content().contentType(MediaType.APPLICATION_JSON))
.andReturn();
JSONObj obj = JSONWrapper.read(result.getResponse().getContentAsString()).toObject();
assertEquals(2, obj.integer("total").intValue());
assertEquals(2, obj.integer("count").intValue());
assertEquals(0, obj.integer("page").intValue());
JSONArr arr = obj.array("layers");