Removing some post return code
Adding unittest coverage for Cast class