public class JamesConfigTest { public static void main(String[] args) throws Exception { redClient = new MailClient("red", "red", "localhost"); blueClient = new MailClient("blue", "blue", "localhost"); greenClient = new MailClient("green", "green", "localhost"); System.out.println("Hello my dear friends"); //CLEAR EVERYBODY'S INBOX redClient.checkInbox(MailClient.CLEAR_MESSAGES); greenClient.checkInbox(MailClient.CLEAR_MESSAGES); blueClient.checkInbox(MailClient.CLEAR_MESSAGES); Thread.sleep(500); // Let the server catch up // SEND A COUPLE OF MESSAGES TO BLUE (FROM RED AND GREEN) redClient.sendMessage( "blue@localhost", "Testing blue from red", "This is a test message"); greenClient.sendMessage( "blue@localhost", "Testing blue from green", "This is a test message"); Thread.sleep(68000); // Let the server catch up // LIST MESSAGES FOR BLUE (EXPECT MESSAGES FROM RED AND GREEN) blueClient.checkInbox(MailClient.SHOW_AND_CLEAR); } void createclients(String name,String password) { // CREATE CLIENT INSTANCES } private String host="localhost"; static MailClient redClient; static MailClient blueClient; static MailClient greenClient; }