Automate testing of template titles

Instead of hard-coding the list of section titles in the unit test,
just auto-generate it by reading the template.

Change-Id: Ifa7bb3a207f2160c2e95b74dab7e2692aeea6ed1