tests: Add tests for generic and virtual types