PrivateEC2CloudifyDriver extends CloudDriverSupport implements
		ProvisioningDriver, CustomServiceDataAware { public PrivateEc2Template getPrivateEc2TemplateFromFile(final File cloudDirectory, final String templateFileName) throws PrivateEc2ParserException, IOException { final File file = new File(cloudDirectory, templateFileName); if (!file.exists()) { throw new IllegalArgumentException("CFN Template not found: " + file.getPath()); } logger.fine("CFN template: " + file.getPath()); final String templateName = this.getTemplatName(file); final File propsFile = new File(file.getParent(), templateName + "-cfn.properties"); logger.fine("Searching for CFN properties: " + file.getPath()); PrivateEc2Template mapJson = null; if (propsFile.exists()) { final String templateString = this.replaceProperties(file, propsFile); logger.fine("The merged template:\n" + templateString); mapJson = ParserUtils.mapJson(PrivateEc2Template.class, templateString); } else { mapJson = ParserUtils.mapJson(PrivateEc2Template.class, file); } return mapJson; }  @Override void setCustomDataFile(final File customDataFile); Cloud getCloud(); @Override void setConfig(final Cloud cloud, final String cloudTemplateName, final boolean management,
			final String fullServiceName); PrivateEc2Template getPrivateEc2TemplateFromFile(final File cloudDirectory, final String templateFileName); @Override MachineDetails startMachine(final String locationId, final long duration, final TimeUnit unit); @Override boolean stopMachine(final String serverIp, final long duration, final TimeUnit unit); @Override Object getComputeContext(); @Override MachineDetails[] startManagementMachines(final long duration, final TimeUnit unit); @Override void stopManagementMachines(); @Override String getCloudName(); @Override void close(); @Override void onServiceUninstalled(final long duration, final TimeUnit unit);  }
@Test public void testManagerCFN() throws Exception { String managerCfnTemplateFile = "privateEc2-cfn.template"; final File cloudDirectory = new File("src/main/resources/clouds/privateEc2/"); Assert.assertTrue(cloudDirectory.exists() && cloudDirectory.isDirectory()); PrivateEc2Template template = driver.getPrivateEc2TemplateFromFile(cloudDirectory, managerCfnTemplateFile); Assert.assertNotNull(template); logger.info(template.toString()); Assert.assertNotNull(template.getResources()); AWSEC2Instance awsec2Instance = (AWSEC2Instance) template.getEC2Instance(); Assert.assertNotNull(awsec2Instance.getProperties().getImageId()); List<VolumeMapping> volumes = awsec2Instance.getProperties().getVolumes(); Assert.assertNull(volumes); }