getConnection(0).sendPacket(version);
// Wait up to 5 seconds for a result.
IQ result = (IQ)collector.nextResult(5000);
// Close the collector
collector.cancel();
assertNotNull("No result from the server", result);
assertEquals("Incorrect result type", IQ.Type.RESULT, result.getType());
assertNotNull("No name specified in the result", ((Version)result).getName());