'If the process associated with an L{mail.alias.MessageWrapper} exits
before I{eomReceived} is called, the L{Deferred} returned by
I{eomReceived} should fail.'

def test_earlyProcessTermination(self):

    transport = StubProcess()
    protocol = mail.alias.ProcessAliasProtocol()
    protocol.makeConnection(transport)
    receiver = mail.alias.MessageWrapper(protocol, None, None)
    protocol.processEnded(failure.Failure(ProcessDone(0)))
    return self.assertFailure(receiver.eomReceived(), ProcessDone)
