Can we write some tests for this and expire_sessions?