JobDefinitionHelper { public String getActivitiJobDefinitionTemplate() { String defaultActivitiIdTemplate = getNamespaceToken() + "." + getJobNameToken(); String template = configurationHelper.getProperty(ConfigurationValue.ACTIVITI_JOB_DEFINITION_ID_TEMPLATE); if (template == null) { template = defaultActivitiIdTemplate; } return template; }  String buildActivitiIdString(String namespaceCd, String jobName); String getActivitiJobDefinitionTemplate(); String getJobNameToken(); Pattern getNamespaceAndJobNameRegexPattern(); JobDefinitionAlternateKeyDto getJobDefinitionKey(String processDefinitionKey); JobDefinitionAlternateKeyDto getJobDefinitionKey(String processDefinitionKey, Pattern regexPattern); String getNamespaceToken(); void maskPassword(Parameter parameter);  }
@Test public void testGetActivitiJobDefinitionTemplateUsingConfiguredActivitiIdTemplate() throws Exception { String testActivitiIdTemplate = "testActivitiIdTemplate"; Map<String, Object> overrideMap = new HashMap<>(); overrideMap.put(ConfigurationValue.ACTIVITI_JOB_DEFINITION_ID_TEMPLATE.getKey(), testActivitiIdTemplate); modifyPropertySourceInEnvironment(overrideMap); try { assertEquals(testActivitiIdTemplate, jobDefinitionHelper.getActivitiJobDefinitionTemplate()); } finally { restorePropertySourceInEnvironment(); } }
@Test public void testGetActivitiJobDefinitionTemplateUsingDefaultActivitiIdTemplate() { assertEquals("~namespace~.~jobName~", jobDefinitionHelper.getActivitiJobDefinitionTemplate()); }