Added a test for generic types. There is some stuff about boxing here that I should fix some day