'Send a new style object and check the number of allocations.'

def test_alloc(self):

    orig = NewStyleCopy2()
    self.assertEqual(NewStyleCopy2.allocated, 1)
    self.assertEqual(NewStyleCopy2.initialized, 1)
    d = self.ref.callRemote('echo', orig)
    self.pump.flush()
    def cb(res):
        self.assertIsInstance(res, NewStyleCopy2)
        self.assertEqual(res.value, 2)
        self.assertEqual(NewStyleCopy2.allocated, 3)
        self.assertEqual(NewStyleCopy2.initialized, 1)
        self.assertIsNot(res, orig)
    d.addCallback(cb)
    return d
