GetMethod getMethod = executeGet(getFullUri(WikisResource.class));
Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());
Wikis wikis = (Wikis) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream());
Assert.assertTrue(wikis.getWikis().size() > 0);
Wiki wiki = wikis.getWikis().get(0);
// Get a link to an index of spaces (http://localhost:8080/xwiki/rest/wikis/xwiki/spaces)
Link spacesLink = getFirstLinkByRelation(wiki, Relations.SPACES);
Assert.assertNotNull(spacesLink);
getMethod = executeGet(spacesLink.getHref());