Rewrote rest of template tests as unittests.