}
public void testRemoveSpace() throws Exception
{
List<SpaceSummary> spaces = rpc.getSpaces();
SpaceSummary spaceToBeRemoved = null;
for (SpaceSummary spaceSummary : spaces) {
if (spaceSummary.getKey().startsWith(TestConstants.TEST_PREFIX)) {
spaceToBeRemoved = spaceSummary;
break;
}
}
Boolean result = rpc.removeSpace(spaceToBeRemoved.getKey());
TestUtils.banner("TEST: removeSpace()");
System.out.format("%s removed: %b\n", spaceToBeRemoved.getKey(), result);
boolean found = false;
spaces = rpc.getSpaces();
for (SpaceSummary spaceSummary : spaces) {
if (spaceSummary.getKey().equals(spaceToBeRemoved.getKey())) {
System.out.format("Page still existing: %s\n", spaceSummary);
found = true;
break;
}
}