protected void checkOrder(int[] expected,String[] nodeIDs,List<String> actual){
  Assert.assertEquals(expected.length,actual.size());
  for (int i=0; i < expected.length; i++) {
    Assert.assertEquals("did not receive expected nodeID at " + i,nodeIDs[expected[i]],actual.get(i));
  }
}

protected void checkOrder ( int [ ] expected , String [ ] nodeIDs , List < String > actual ) { Assert . assertEquals ( expected . length , actual . size ( ) ) ; for ( int i = 0 ; i < expected . length ; i ++ ) { Assert . assertEquals ( "did not receive expected nodeID at " + i , nodeIDs [ expected [ i ] ] , actual . get ( i ) ) ; } }
check that the actual list of received nodeids correspond to the expected order of nodes
