Fixed #23768 -- Rewrote template tests as unit tests

I figured it out after I reviewed enough of the files. Meaningful test names or classes sounds good. Not a blocker to getting the first version of this merged though.