Add tests for different modes of modifying a handle