add tests for generic type