public void testHandleAnnouncedMessageSizeLimitExceeded() throws Exception {
m_testConfiguration.setMaxMessageSize(1); // set message limit to 1kb
finishSetUp(m_testConfiguration);
SMTPClient smtpProtocol = new SMTPClient();
smtpProtocol.connect("127.0.0.1", m_smtpListenerPort);
smtpProtocol.sendCommand("ehlo " + InetAddress.getLocalHost());
smtpProtocol.sendCommand("MAIL FROM:<mail@localhost> SIZE=1025", null);
assertEquals("expected error: max msg size exceeded", 552, smtpProtocol.getReplyCode());