'Test that trying to download a message with a bad argument, either a
message number which isn\'t an integer or is an out-of-bounds integer or
a number of lines which isn\'t an integer or is a negative integer,
fails with the appropriate error response.'

def testTOPWithBadArgument(self):

    p = self.pop3Server
    s = self.pop3Transport
    p.mbox.messages.append(self.extraMessage)
    p.lineReceived('TOP    1    a')
    self.assertEqual(s.getvalue(), '-ERR    Bad    line    count    argument\r\n')
    s.truncate(0)
    p.lineReceived('TOP    1    -1')
    self.assertEqual(s.getvalue(), '-ERR    Bad    line    count    argument\r\n')
    s.truncate(0)
    p.lineReceived('TOP    a    1')
    self.assertEqual(s.getvalue(), '-ERR    Bad    message    number    argument\r\n')
    s.truncate(0)
    p.lineReceived('TOP    0    1')
    self.assertEqual(s.getvalue(), '-ERR    Bad    message    number    argument\r\n')
    s.truncate(0)
    p.lineReceived('TOP    3    1')
    self.assertEqual(s.getvalue(), '-ERR    Bad    message    number    argument\r\n')
    s.truncate(0)
