CertificateManager { public synchronized SecurityStore generateContainerKeystore(String hostname, String requesterId, String role, String keystorePass) throws SliderException { LOG.info("Generation of container keystore for container {} on {}", requesterId, hostname); generateContainerCertificate(hostname, requesterId); String srvrCrtPass = SecurityUtils.getKeystorePass(); String srvrKstrDir = SecurityUtils.getSecurityDir(); String containerCrtName = requesterId + ".crt"; String containerKeyName = requesterId + ".key"; String kstrName = getKeystoreFileName(requesterId, role); Object[] scriptArgs = {srvrCrtPass, keystorePass, srvrKstrDir, containerKeyName, containerCrtName, kstrName}; String command = MessageFormat.format(EXPRT_KSTR, scriptArgs); runCommand(command); return new SecurityStore(new File(srvrKstrDir, kstrName), SecurityStore.StoreType.keystore); }  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 testContainerKeystoreGeneration() throws Exception { SecurityStore keystoreFile = certMan.generateContainerKeystore("testhost", "container1", "component1", "password"); validateKeystore(keystoreFile.getFile(), "testhost", "cahost"); }