Set<Session> sessions = new HashSet<Session>();
// Create and open many sessions.
synchronized (sessionManager) {
for (int i = 0; i < size; i++) {
Session ses = sessionManager.createSession();
ses.open();
sessions.add(ses);
}
// Check that 500 sessions have been created
assertEquals(initialSize + size, sessionManager.getRegisteredSessionIDs().size());
}