AutonomiccsSystemVmDeploymentService implements InitializingBean { protected String createAutonomiccsSystemVmNameForType(long id, SystemVmType systemVmType, String instanceSuffix) { return String.format("%s-%d-%s", systemVmType.getNamePrefix(), id, instanceSuffix); }  HostVO searchForRandomHostInCloudToDeployAutonomiccsSystemVm(); HostVO searchForRandomHostInPodToDeployAutonomiccsSystemVm(HostPodVO pod); HostVO searchForAnotherRandomHostToStartSystemVm(VMInstanceVO vmInstance); AutonomiccsSystemVm deploySystemVmWithJava(Long hostId, SystemVmType systemVmType); @Override void afterPropertiesSet();  }
@Test public void createAutonomiccsSystemVmNameForTypeTest() { String result = spy.createAutonomiccsSystemVmNameForType(123l, SystemVmType.ClusterManagerAgent, "instanceSuffix"); Assert.assertEquals("CM-A-123-instanceSuffix", result); }