'Verify that if the process associated with an
L{mail.alias.MessageWrapper} exits with the given status, the
L{Deferred} returned by I{eomReceived} fails with L{ProcessTerminated}.'

def _terminationTest(self, status):

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