Closures and mutable state test example.