chain.put("org.apache.james.smtpserver.protocol.DNSService", dnsService);
queueFactory = new MockMailQueueFactory();
queue = (MockMailQueue) queueFactory.getQueue(MockMailQueueFactory.SPOOL);
chain.put("mailqueuefactory", queueFactory);
chain.put("domainlist", new SimpleDomainList() {
@Override
public boolean containsDomain(String serverName) {
return "localhost".equals(serverName);
}