Added unit test for onValueChange