'Assert that when the given buffer is passed to ``Connection.recv_into``
along with a value for ``nbytes`` that is less than the size of that
buffer, only ``nbytes`` bytes are written into the buffer.'

def _respects_length_test(self, factory):

    output_buffer = factory(10)
    (server, client) = self._loopback()
    server.send(b('abcdefghij'))
    self.assertEqual(client.recv_into(output_buffer, 5), 5)
    self.assertEqual(output_buffer, bytearray(b('abcde\x00\x00\x00\x00\x00')))
