LPS-39254 Avoid doPrivileged call in processTemplate, when security is not required
LPS-39254 Fix unit tests
LPS-39254 SF