Turns out Opportunity Mars rover is already working for nine years. It uses Li-Ion batteries to store energy acquired from the solar panels.
In my experience Li-Ion batteries when recharged frequently have about 40% of the original capacity after having been used for three years. I haven't tested, but I expect that in nine years they would barely charge.
Yet the rover batteries seem to have enough capacity left after nine years.
How is that possible?