class AzureCredentialAppCreationCommand {

    public String generate(String deploymentAddress) {
        try {
            if (StringUtils.isEmpty(deploymentAddress)) {
                deploymentAddress = DEFAULT_DEPLOYMENT_ADDRESS;
            }
            Map<String, Object> model = buildModel(deploymentAddress, getAppIdentifierURI(deploymentAddress), getReplyURL(deploymentAddress));

            Template template = freemarkerConfiguration.getTemplate(appCreationCommandTemplatePath, ENCODING);
            return processTemplateIntoString(template, model);
        } catch (IOException | TemplateException e) {
            String message = String.format(GENERATE_EXCEPTION_MESSAGE_FORMAT, appCreationCommandTemplatePath);
            throw new CloudConnectorException(message, e);
        }
    }

}