Add discriminator pattern test case