ResolvableEhloHeloHandler handler = createHandler();
handler.doHelo(session, INVALID_HOST);
assertNotNull("Invalid HELO",session.getAttachment(ResolvableEhloHeloHandler.BAD_EHLO_HELO, State.Transaction));
int result = handler.doRcpt(session,null, mailAddress).getResult();
assertEquals("Reject", result,HookReturnCode.DENY);
}
@Test
public void testNotRejectValidHelo() throws MailAddressException {