Test cases for cast