Refactored tests for `expand_as_exp`

Now since we have added `expand_as_exp` in `Basic` we can directly
call the function instead of casting it.