Implementation and tests for ReleaseTicket