AutonomiccsSystemVmTemplateService implements InitializingBean { public String getSystemVmTemplateUrl(HypervisorType hypervisor) { switch (hypervisor) { case XenServer: case KVM: return constructSystemVmTemplateUrl(hypervisor); default: throw new CloudRuntimeException(String.format("We do not have a Autonomiccs System VM template for the given Hypervisor [%s] .", hypervisor)); } }  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(expected = CloudRuntimeException.class) public void getSystemVmTemplateUrlTestExpectCloudRuntimeException() { spy.getSystemVmTemplateUrl(HypervisorType.Any); }