AutonomiccsSystemVmTemplateService implements InitializingBean { @Override public void afterPropertiesSet() throws Exception { logger.info("Autonomiccs system VMs template service initialized."); autonomiccsSystemVmTemplateDisplayText = String.format("Autonomiccs System VM template (%s)", systemVmTemplateVersion); logger.debug(String.format("Autonomiccs system VMs template display text configured [%s]", autonomiccsSystemVmTemplateDisplayText)); autonomiccsSystemVmTemplateName = String.format("autonomiccs-systemVm-%s", systemVmTemplateVersion); logger.debug(String.format("Autonomiccs system VMs template name configured [%s]", systemVmTemplateVersion)); }  boolean isTemplateRegisteredForHypervisor(HypervisorType hypervisorType); String getAutonomiccsSystemVmTemplateDisplayText(HypervisorType hypervisor); String getAutonomiccsSystemVmTemplateName(HypervisorType hypervisor); String getSystemVmTemplateUrl(HypervisorType hypervisor); VMTemplateVO findAutonomiccsSystemVmTemplate(HypervisorType hypervisor); @Override /** * This method is executed by Spring framework. * It configures the template's display text and name */ void afterPropertiesSet(); boolean isTemplateRegisteredAndReadyForHypervisor(HypervisorType hypervisorType);  }
@Test public void afterPropertiesSetTest() throws Exception { spy.afterPropertiesSet(); Assert.assertEquals("Autonomiccs System VM template (systemVmTemplateVersion)", spy.autonomiccsSystemVmTemplateDisplayText); Assert.assertEquals("autonomiccs-systemVm-systemVmTemplateVersion", spy.autonomiccsSystemVmTemplateName); }