if the batteries are replaced every 4 years then there should be no danger of them dying when the 240v is removed.
.
It's not always the case Grame, that's why battery calculation has to be carried out every three months, four years may be the maximum period, as you may change them 2-3 times in four years, it's still depending on how many times there was cut of power and for for how long, also for how long alarm went off while the mains was cut off, also the factor of temperature which is found to be playing a major role in reducing the life cycle of the battery..., today I found a new heater fitted under the fire alarm system less then a meter far away, I found the panel really warm as well as the batteries, wich make the batteries draw current quicker than with lower temperature...
You may have realised why the battery tester gives you Voltage, current and temperature measurments all in one test!, the tester has been designed to take into account the temperature as well...etc
Also in three months time any thing could happen!