Added a test for unions.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>