[TASK] Refactor getTemplateIdentifier to ternary syntax for coverage

No technical difference but allows full coverage of an otherwise impossible-to-reach code point.
[TASK] Refactor and cover with tests AbstractProvider class