JobDetailFormatter { protected static String getVmDetails(TankConfig config, String vmInstanceType) { List<VmInstanceType> instanceTypes = config.getVmManagerConfig().getInstanceTypes(); StringBuilder sb = new StringBuilder(); sb.append(vmInstanceType); instanceTypes.stream().filter(type -> type.getName().equals(vmInstanceType)).findFirst().ifPresent(type -> sb.append(" (cpus=").append(type.getCpus()) .append(" ecus=").append(type.getEcus()) .append(" memory=").append(type.getMemory()) .append(" cost=$").append(type.getCost()).append(" per hour)")); return sb.toString(); }  static String createJobDetails(JobValidator validator, Workload workload, JobInstance proposedJobInstance); static String createJobDetails(JobValidator validator, String scriptName);  }
@Test public void getVmDetails() { String vmDetails = JobDetailFormatter.getVmDetails(new TankConfig(), "c3.xlarge"); assertEquals(vmDetails, "c3.xlarge (cpus=4 ecus=14 memory=7.5 cost=$0.21 per hour)"); }
@Test public void testGetVmDetails_1() throws Exception { TankConfig config = new TankConfig(); String vmInstanceType = ""; String result = JobDetailFormatter.getVmDetails(config, vmInstanceType); assertNotNull(result); }
@Test public void testGetVmDetails_2() throws Exception { TankConfig config = new TankConfig(); String vmInstanceType = ""; String result = JobDetailFormatter.getVmDetails(config, vmInstanceType); assertNotNull(result); }
@Test public void testGetVmDetails_3() throws Exception { TankConfig config = new TankConfig(); String vmInstanceType = ""; String result = JobDetailFormatter.getVmDetails(config, vmInstanceType); assertNotNull(result); }