/** Test of getMaster method, of class HadoopCluster. */
 @Test
 public void testGetMaster() {
   System.out.println("getMaster");
   ClusterInstance result = cluster.getMaster();
   assertNotNull(result);
   assertEquals(cluster.getMasterGroupName(), result.getSecurityGroups().get(0));
   Instance slaveInstance = result.getInstance();
   StringBuilder sb = new StringBuilder("\t");
   sb.append(slaveInstance.getInstanceId());
   sb.append(" ");
   sb.append(slaveInstance.getInstanceType());
   sb.append(" ");
   sb.append(slaveInstance.getLaunchTime().toString());
   sb.append(" ");
   sb.append(slaveInstance.getImageId());
   out.println(sb.toString());
 }
 /** Test of getSlaves method, of class HadoopCluster. */
 @Test
 public void testGetSlaves() {
   out.println("getSlaves");
   List<ClusterInstance> result = cluster.getSlaves();
   out.println("found " + result.size() + " slaves for group " + TEST_GROUP);
   assertNotNull(result);
   StringBuilder sb = new StringBuilder("\t");
   for (ClusterInstance slave : result) {
     assertEquals(cluster.getGroupName(), slave.getSecurityGroups().get(0));
     Instance slaveInstance = slave.getInstance();
     if (sb.length() > 1) sb.delete(1, sb.length());
     sb.append(slaveInstance.getInstanceId());
     sb.append(" ");
     sb.append(slaveInstance.getInstanceType());
     sb.append(" ");
     sb.append(slaveInstance.getLaunchTime().toString());
     sb.append(" ");
     sb.append(slaveInstance.getImageId());
     out.println(sb.toString());
   }
 }