.contentType(MediaType.APPLICATION_JSON)
.content(obj.toString());
MockHttpServletRequest req = reqBuilder.buildRequest(new MockServletContext());
try {
new MapController(geoServer, new RecentObjectCache())
.create("foo", new JSONObj().put("name", "map1"), req);
fail();
}
catch(BadRequestException e) {
assertTrue(e.getMessage().contains("already exists"));