public MailConfiguration getConfiguration() {
        if (configuration == null) {
            configuration = new MailConfiguration(getCamelContext());
        }
        return configuration;
    }
@Test
    public void testDefaultIMAPConfiguration() {
        MailEndpoint endpoint = checkEndpoint("imap://james@myhost?password=secret");
        MailConfiguration config = endpoint.getConfiguration();
        assertEquals("imap", config.getProtocol(), "getProtocol()");
        assertEquals("myhost", config.getHost(), "getHost()");
        assertEquals(MailUtils.DEFAULT_PORT_IMAP, config.getPort(), "getPort()");
        assertEquals("james", config.getUsername(), "getUsername()");
        assertEquals("james@myhost", config.getRecipients().get(Message.RecipientType.TO),
                "getRecipients().get(Message.RecipientType.TO)");
        assertEquals("INBOX", config.getFolderName(), "folder");
        assertEquals("camel@localhost", config.getFrom(), "from");
        assertEquals("secret", config.getPassword(), "password");
        assertFalse(config.isDelete());
        assertFalse(config.isIgnoreUriScheme());
        assertEquals(-1, config.getFetchSize(), "fetchSize");
        assertEquals("text/plain", config.getContentType(), MailConstants.MAIL_CONTENT_TYPE);
        assertEquals(true, config.isUnseen(), "unseen");
        assertFalse(config.isDebugMode());
    }