Test cases done for the ArrayList using different type casting