question: public static void waitForInstancesToBeStopped ( AmazonEC2AsyncClient client , VerificationHost host , List < String > instanceIdsToStop ) throws Throwable { ArrayList < Boolean > stopFlags = new ArrayList < > ( instanceIdsToStop . size ( ) ) ; for ( int i = 0 ; i < instanceIdsToStop . size ( ) ; i ++ ) { stopFlags . add ( i , Boolean . FALSE ) ; } host . waitFor ( "Error waiting for EC2 client stop instances in test " , null ) ; }
target:  Wait for the instances have their status set to stopped.