Added unittests for If