CertificateManager { public synchronized void generateContainerCertificate(String hostname, String identifier) { LOG.info("Generation of certificate for {}", hostname); String srvrKstrDir = SecurityUtils.getSecurityDir(); Object[] scriptArgs = {srvrKstrDir, getSubjectDN(hostname, identifier, this.applicationName), identifier, SecurityUtils.getSecurityDir()}; try { String command = MessageFormat.format(GEN_AGENT_KEY, scriptArgs); runCommand(command); signAgentCertificate(identifier); } catch (SliderException e) { LOG.error("Error generating the agent certificate", e); } }  void initialize(MapOperations compOperations); void initialize(MapOperations compOperations,
                         String hostname, String containerId,
                         String appName); void setPassphrase(String passphrase); synchronized void generateContainerCertificate(String hostname,
                                                        String identifier); synchronized SecurityStore generateContainerKeystore(String hostname,
                                                              String requesterId,
                                                              String role,
                                                              String keystorePass); SecurityStore generateContainerTruststore(String containerId,
                                                   String role,
                                                   String truststorePass); String getServerCert(); static File getServerCertficateFilePath(); static File getAgentCertficateFilePath(String containerId); static File getContainerKeystoreFilePath(String containerId,
                                                  String role); static File getContainerTruststoreFilePath(String role,
                                                    String containerId); static File getAgentKeyFilePath(String containerId); synchronized SignCertResponse signAgentCrt(String agentHostname,
                                                    String agentCrtReqContent,
                                                    String passphraseAgent);  }
@Test public void testContainerCertificateGeneration() throws Exception { certMan.generateContainerCertificate("testhost", "container1"); Assert.assertTrue("container certificate not generated", new File(secDir, "container1.crt").exists()); }