added test case for cast and format handlers