MessageProcessor implements ITask, IMessageProcessor, IManagedTask, IShutdownAwareTask { @Override public void setConfig(final IObject config) throws InvalidArgumentException { if (null == config) { throw new InvalidArgumentException("Configuration object should not be null."); } this.config = config; } MessageProcessor(final IQueue<ITask> taskQueue, final IMessageProcessingSequence messageProcessingSequence, final IObject config); @Override void process(final IObject theMessage, final IObject theContext); @Override void pauseProcess(); @Override void continueProcess(final Throwable e); @Override void signal(final String signalName); @Override IObject getContext(); @Override IObject getResponse(); @Override IObject getMessage(); @Override IMessageProcessingSequence getSequence(); @Override IObject getEnvironment(); @Override void pushEnvironment(final IObject newEnvironment); @Override void resetEnvironment(); @Override void setConfig(final IObject config); @Override void execute(); @Override T getAs(final Class<T> clazz); @Override void notifyShuttingDown(); @Override void notifyIgnored(); @Override void setShutdownStatus(final Object status); @Override Object getShutdownStatus();  }
@Test(expected = InvalidArgumentException.class) public void Should_setConfigThrow_When_ConfigIsNull() throws Exception { new MessageProcessor(taskQueueMock, messageProcessingSequenceMock, configurationMock).setConfig(null); }