Fixed #23768 -- Rewrote template tests as unit tests

can omit these two newlines