Test cases for A2.