added more test cases for learn method