'``update_leases`` returns a ``Deferred`` firing with the updated
``Leases`` instance.'

def test_update_leases_result(self):

    node_id = uuid4()
    dataset_id = uuid4()
    original_leases = Leases()
    def update(leases):
        return leases.acquire(datetime.fromtimestamp(1000, UTC), dataset_id, node_id)
    d = update_leases(update, self.persistence_service)
    def updated(updated_leases):
        self.assertEqual(updated_leases, update(original_leases))
    d.addCallback(updated)
    return d
