rewrite apiary-clientsession.