Added unit test for off()