added tests for discriminated unions