Buggy code:
public class KoyaMailService implements InitializingBean { private final Logger logger = Logger . getLogger ( this . getClass ( ) ) ; private static final String SHARE_NOTIFICATION_SUBJECT = "koya.share-notification.subject" ; private static final String RESET_PASSWORD_SUBJECT = "koya.reset-password.subject" ; private static final String INACTIVEDOSSIER_NOTIFICATION_SUBJECT = "koya.inactivedossier-notification.subject" ; private static final String ACTIVITIESEMAIL_SUBJECT = "koya.activities-email.subject" ; private static final String CLIENT_UPLOADALERT_EMAIL_SUBJECT = "koya.clientdoc-upload.subject" ; private static final String TPL_MAIL_KOYAROOT = "////app:company_home//app:dictionary//app:email_templates//cm:koya_templates" ; private static final String TPL_MAIL_I18NSUBJECTS = ( KoyaMailService . TPL_MAIL_KOYAROOT ) + "//cm:koyamail.properties" ; private static final String TPL_MAIL_SHARENOTIF = ( KoyaMailService . TPL_MAIL_KOYAROOT ) + "//cm:share-notification.html.ftl" ; private static final String TPL_MAIL_CLIENTUPLOADALERT = ( KoyaMailService . TPL_MAIL_KOYAROOT ) + "//cm:clientdoc-upload.html.ftl" ; private static final String TPL_MAIL_RESET_PWD = ( KoyaMailService . TPL_MAIL_KOYAROOT ) + "//cm:reset-password.html.ftl" ; public static final String TPL_MAIL_INVITATION = ( KoyaMailService . TPL_MAIL_KOYAROOT ) + "//cm:invite.html.ftl" ; private static final String TPL_MAIL_INACTIVEDOSSIERNOTIF_ = ( KoyaMailService . TPL_MAIL_KOYAROOT ) + "//cm:inactive-dossiers.html.ftl" ; private static final NodeRef TPLNODEREF_MAIL_I18NSUBJECTS = new NodeRef ( "workspace:////SpacesStore//b6bf4b3d-317d-4145-808e-92b5e3ae5fea" ) ; private static final NodeRef TPLNODEREF_MAIL_SHARENOTIF = new NodeRef ( "workspace:////SpacesStore//34c1e5bf-9115-4496-84f1-8e695911020f" ) ; private static final NodeRef TPLNODEREF_MAIL_CLIENTUPLOADALERT = new NodeRef ( "workspace:////SpacesStore//a61ce4cd-6006-4f0b-ad09-6e6b5d3435a4" ) ; private static final NodeRef TPLNODEREF_MAIL_RESET_PWD = new NodeRef ( "workspace:////SpacesStore//9d5fbb22-9810-40f3-b461-aa1a253e73bb" ) ; public static final NodeRef TPLNODEREF_MAIL_INVITATION = new NodeRef ( "workspace:////SpacesStore//035a2bac-77f8-4747-a25d-e695d9f7651e" ) ; private static final NodeRef TPLNODEREF_MAIL_INACTIVEDOSSIERNOTIF_ = new NodeRef ( "workspace:////SpacesStore//141585d0-0ba8-4cc0-bf85-71e88d038ac2" ) ; protected NamespaceService namespaceService ; protected FileFolderService fileFolderService ; protected SearchService searchService ; protected NodeService nodeService ; protected ActionService actionService ; protected KoyaNodeService koyaNodeService ; protected UserService userService ; protected ServiceRegistry serviceRegistry ; protected CompanyAclService companyAclService ; protected CompanyService companyService ; protected SpaceAclService spaceAclService ; protected CompanyPropertiesService companyPropertiesService ; protected WorkflowService workflowService ; protected AuthenticationService authenticationService ; protected Repository repositoryHelper ; protected MessageService messageService ; protected String koyaDirectLinkUrlTemplate ; protected String koyaClientServerPath ; protected HashMap < String , Object > koyaClientParams ; public void setNamespaceService ( NamespaceService namespaceService ) { } public void setFileFolderService ( FileFolderService fileFolderService ) { } public void setSearchService ( SearchService searchService ) { } public void setNodeService ( NodeService nodeService ) { } public void setActionService ( ActionService actionService ) { } public void setKoyaNodeService ( KoyaNodeService koyaNodeService ) { } public void setUserService ( UserService userService ) { } public void setServiceRegistry ( ServiceRegistry serviceRegistry ) { } public void setKoyaDirectLinkUrlTemplate ( String koyaDirectLinkUrlTemplate ) { } public void setKoyaClientServerPath ( String koyaClientServerPath ) { } public void setCompanyAclService ( CompanyAclService companyAclService ) { } public void setCompanyService ( CompanyService companyService ) { } public void setSpaceAclService ( SpaceAclService spaceAclService ) { } public void setCompanyPropertiesService ( CompanyPropertiesService companyPropertiesService ) { } public void setWorkflowService ( WorkflowService workflowService ) { } public void setAuthenticationService ( AuthenticationService authenticationService ) { } public void setRepositoryHelper ( Repository repositoryHelper ) { } public void setMessageService ( MessageService messageService ) { } public HashMap getKoyaClientParams ( ) { } @ Override public void afterPropertiesSet ( ) throws Exception { koyaClientParams = new HashMap < > ( ) ; <START_BUG> koyaClientParams . put ( "serverPath" , companyAclService . getKoyaClientServerPath ( ) ) ; <END_BUG> } public void sendShareAlertMail ( String destUserName , String inviterUserName , final NodeRef sharedNodeRef ) throws KoyaServiceException { } public void sendClientUploadAlertMail ( final Dossier dossier , final Document document , User clientUploader , List < User > notifiedUsers , Boolean notifyCompanyManagers ) throws KoyaServiceException { } public void sendUserNotifMail ( NodeRef personNodeRef , Map < String , Object > model , String templateNodeRef , String companyName ) { } public void sendResetRequestMail ( String destMail , String resetRequestUrl ) throws KoyaServiceException { } public void sendInactiveDossierNotification ( User dest , NodeRef space , List < NodeRef > inactiveDossiers , Company c ) throws KoyaServiceException { } public String sendInviteMail ( final String inviteId ) throws KoyaServiceException { } public void sendMail ( MailWrapper wrapper ) throws KoyaServiceException { } public String getI18nSubject ( String propKey , Map < String , Object > templateValues ) throws KoyaServiceException { } public NodeRef getFileTemplateRef ( RepositoryLocation templateRepoLocation ) throws KoyaServiceException { } public String getDirectLinkUrl ( NodeRef n ) { } }

Fix:
koyaClientParams . put ( "serverPath" , koyaClientServerPath ) ;