Code example for TreeSet

Methods: last

0
        // When running InVM we will have con:0 and externally con:1 
 
        HashMap<Integer, List<String>> connectionData = splitResultsOnConnectionID(results);
 
        // Get the last Integer from keySet of the ConnectionData 
        int connectionID = new TreeSet<Integer>(connectionData.keySet()).last();
 
        //Use just the data from the last connection for the test 
        results = connectionData.get(connectionID);
 
        // If we are running inVM or with 0-10 we will get three open messagse 
	    // if running externally with 0-8/0-9 we will also have open and close messages from the failed 0-10 negotiation  
	    assertTrue("CON messages not logged:" + results.size(), results.size() >= 3);
 
        String log = getLogMessage(results, 0);
        //  MESSAGE [con:1(/127.0.0.1:52540)] CON-1001 : Open 
        //1 & 2 
        validateMessageID("CON-1001",log);
 
        // validate the last three CON- messages. 
Contextual code suggestions in your IDE  Get Codota for Java