return server;
}
protected void setDefaultCloudSpace(CloudFoundryServer cloudServer, String orgName, String spaceName)
throws CoreException {
CloudOrgsAndSpaces spaces = CloudUiUtil.getCloudSpaces(cloudServer.getUsername(),
cloudServer.getPassword(), cloudServer.getUrl(), false, cloudServer.getSelfSignedCertificate(),
null);
Assert.isTrue(spaces != null, "Failed to resolve orgs and spaces.");
Assert.isTrue(spaces.getDefaultCloudSpace() != null,
"No default space selected in cloud space lookup handler.");
CloudSpace cloudSpace = spaces.getSpace(orgName, spaceName);
if (cloudSpace == null) {
throw CloudErrorUtil.toCoreException("Failed to resolve cloud space when running junits: " + orgName
+ " - " + spaceName);
}
cloudServer.setSpace(cloudSpace);