refactor Add more template tests

Close #485