*/
jcrRegistry.saveHostDescription(host);
jcrRegistry.saveServiceDescription(serv);
ApplicationDeploymentDescription app = new ApplicationDeploymentDescription();
app.getType().addNewApplicationName().setStringValue("ECHOLOCAL");
app.getType().setExecutableLocation("/bin/echo");
app.getType().setScratchWorkingDirectory("/tmp");
jcrRegistry.deployServiceOnHost(serviceId, hostId);
jcrRegistry.saveDeploymentDescription(serviceId, hostId, app);
/*
* Load
*/
ApplicationDeploymentDescription appR = jcrRegistry.getDeploymentDescription(serviceId, hostId);
if(appR == null){
fail("Deployment is null");
}
if(appR.getType().getApplicationName() == null || !appR.getType().getApplicationName().getStringValue().equals("ECHOLOCAL")){
fail("Wrong deployment name");
}
if(!appR.getType().getExecutableLocation().equals("/bin/echo") || !appR.getType().getScratchWorkingDirectory().equals("/tmp")){
fail("Setting and Loading value fail");
}
} catch (Exception e) {