Add generics test

Related to #818