AbstractStateCompositeProcessor processor = new AbstractStateCompositeProcessor() {
@Override
protected MailProcessor createMailProcessor(final String state, HierarchicalConfiguration config) throws
Exception {
return new MockMailProcessor("") {
@Override
public void service(Mail mail) throws MessagingException {
// check if the right processor was selected depending on the state
assertEquals(state, mail.getState());