View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.transport.email.connectors;
8   
9   import org.mule.api.transport.Connector;
10  import org.mule.transport.email.ImapsConnector;
11  
12  import com.icegreen.greenmail.util.ServerSetup;
13  
14  /**
15   * Simple tests for pulling from an IMAP server.
16   */
17  public class ImapsConnectorTestCase extends AbstractReceivingMailConnectorTestCase
18  {
19      public ImapsConnectorTestCase()
20      {
21          super(ServerSetup.PROTOCOL_IMAPS);
22      }
23  
24      public Connector createConnector() throws Exception
25      {
26          ImapsConnector connector = new ImapsConnector(muleContext);
27          connector.setName("ImapsConnector");
28          connector.setCheckFrequency(POLL_PERIOD_MS);
29          connector.setServiceOverrides(newEmailToStringServiceOverrides());
30          connector.setTrustStore("greenmail.jks");
31          connector.setTrustStorePassword("changeit");
32          return connector;
33      }
34  }