FAR- Refundable deposit

What is the treatment for a lessor for collecting refundable deposit in an operating lease. He should recognise an unearned revenue (liability) and then earn it when? At the end of the lease, or is it earned evenly through the lease term?