Unit test that combines CASE expressions with unbox