'If the subprocess exits with exit code 2, the ``Deferred`` returned
from ``zfs_command`` errbacks with ``BadArguments``.'

def test_bad_arguments_exit(self):

    reactor = FakeProcessReactor()
    result = zfs_command(reactor, ['-H', 'lalala'])
    process_protocol = reactor.processes[0].processProtocol
    process_protocol.processEnded(Failure(ProcessTerminated(2)))
    self.failureResultOf(result, BadArguments)
