public MailConfiguration getConfiguration() {
        if (configuration == null) {
            configuration = new MailConfiguration(getCamelContext());
        }
        return configuration;
    }
@Test
    public void testAuthenticator() {
        DefaultAuthenticator auth1 = new DefaultAuthenticator("u1", "p1");
        context.getRegistry().bind("auth1", auth1);
        MailEndpoint endpoint = checkEndpoint("smtp://myhost:25/?authenticator=#auth1&to=james%40myhost");
        MailConfiguration config = endpoint.getConfiguration();
        assertEquals("smtp", config.getProtocol(), "getProtocol()");
        assertEquals("myhost", config.getHost(), "getHost()");
        assertEquals(25, config.getPort(), "getPort()");
        assertNull(config.getUsername(), "getUsername()");
        assertNotNull(config.getPasswordAuthentication(), "getPasswordAuthentication()");
        assertEquals("u1", config.getPasswordAuthentication().getUserName(), "getPasswordAuthentication().getUserName()");
        assertEquals("p1", config.getPasswordAuthentication().getPassword(), "getPasswordAuthentication().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");
        assertNull(config.getPassword(), "password");
        assertFalse(config.isDelete());
        assertFalse(config.isIgnoreUriScheme());
        assertEquals(-1, config.getFetchSize(), "fetchSize");
        assertFalse(config.isDebugMode());
    }