@@ -0,0 +1,2141 @@
+package ikube.action.index.handler.internet.exchange;%0A%0Aimport ikube.action.index.handler.internet.exchange.ExchangeClient;%0Aimport org.junit.Test;%0A%0Aimport java.text.ParseException;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Date;%0Aimport java.util.List;%0A%0Apublic class ExchangeClientTest %7B%0A    private static final String EWS_URL = %22https://outlook.office365.com/ews/exchange.asmx%22;%0A    private static final String USERNAME = %22administrator@iKube.onmicrosoft.com%22;%0A    private static final String PASSWORD = %22iKube101%22;%0A%0A    private static final String PROXY_USERNAME = %22turleyd%22;%0A    private static final String PROXY_PASSWORD = %22proxypassword%22;%0A    private static final String PROXY_URL = %22proxy.post.bpgnet.net%22;%0A    private static final int    PROXY_PORT = 8080;%0A%0A    public static ExchangeClient.Connection TEST_CONN = new ExchangeClient.Connection(%0A            EWS_URL, null, USERNAME, PASSWORD );%0A%0A    public static ExchangeClient.Connection TEST_CONN_PROXY = new ExchangeClient.Connection(%0A            EWS_URL, null, USERNAME, PASSWORD,%0A            PROXY_URL, PROXY_PORT, PROXY_USERNAME, PROXY_PASSWORD);%0A%0A    @Test%0A    public void testTestUserMessageAll() throws Exception %7B%0A        getExchangeUsersInboxEmails(%0A                new ExchangeClient( TEST_CONN.getService()) ,%0A                new Date(),%0A                null );%0A    %7D%0A%0A    @Test%0A    public void testUserMessageBetweenPeriod() throws ParseException %7B%0A        getExchangeUsersInboxEmails(%0A                new ExchangeClient( TEST_CONN.getService() ),%0A                new Date(),%0A                new SimpleDateFormat(%22dd/MM/yyyy%22).parse(%2201/07/2015%22) );%0A    %7D%0A%0A    private void getExchangeUsersInboxEmails(ExchangeClient exchange, Date before, Date after)%7B%0A        List%3CExchangeClient.UserAccount%3E userAccounts = exchange.getUserAccounts();%0A        if(userAccounts != null && userAccounts.size() %3E 0) %7B%0A            for(ExchangeClient.UserAccount userAccount : userAccounts)%7B%0A                ExchangeClient.UserMessages msgs = exchange.getUserMessages(userAccount, before, after );%0A                IndexMessage index = msgs.getNext();%0A            %7D%0A        %7D%0A    %7D%0A%7D

add exchange client test