Improve template API test coverage