Test cases for problem 1