// verify modules
Map<String, Properties> modules = new HashMap<String, Properties>();
int attempts = 0;
while (attempts++ < 60) {
Thread.sleep(500);
for (ModuleMetadataResource module : template.runtimeOperations().listDeployedModules()) {
modules.put(module.getContainerId() + ":" + module.getModuleType() + ":" + module.getName(),
module.getDeploymentProperties());
}
if (modules.size() == 4) {
break;