### Question:
ProcessFormService { public String getProcessPath(final APISession apiSession, final long processDefinitionId) throws BonitaException, UnsupportedEncodingException { final ProcessDeploymentInfo processDeploymentInfo = getProcessAPI(apiSession).getProcessDeploymentInfo(processDefinitionId); return encodePathSegment(processDeploymentInfo.getName()) + "/" + encodePathSegment(processDeploymentInfo.getVersion()); }  String getProcessPath(final APISession apiSession, final long processDefinitionId); String encodePathSegment(final String stringToEncode); long getProcessDefinitionId(final APISession apiSession, final String processName, final String processVersion); long getTaskInstanceId(final APISession apiSession, final long processInstanceId, final String taskName, final long userId); String getTaskName(final APISession apiSession, final long taskInstanceId); long ensureProcessDefinitionId(final APISession apiSession, final long processDefinitionId, final long processInstanceId, final long taskInstanceId); boolean isAllowedToSeeTask(final APISession apiSession, final long taskInstanceId, final long enforcedUserId,
            final boolean assignTask); boolean isAllowedToSeeProcessInstance(final APISession apiSession, final long processInstanceId,
            final long enforcedUserId); boolean isAllowedToStartProcess(final APISession apiSession, final long processDefinitionId, final long enforcedUserId); boolean isAllowedAsAdminOrProcessSupervisor(final HttpServletRequest request, final APISession apiSession, final long processDefinitionId,
            final long taskInstanceId, final long userId, final boolean assignTask);  }### Answer:
@Test public void getProcessDefinitionUUID_should_return_valid_UUID() throws Exception { final ProcessDeploymentInfo processDeploymentInfo = mock(ProcessDeploymentInfo.class); when(processDeploymentInfo.getName()).thenReturn("processName"); when(processDeploymentInfo.getVersion()).thenReturn("processVersion"); when(processAPI.getProcessDeploymentInfo(1L)).thenReturn(processDeploymentInfo); final String uuid = processFormService.getProcessPath(apiSession, 1L); assertEquals("processName/processVersion", uuid); }
@Test public void getProcessDefinitionUUID_should_return_valid_UUID_with_special_characters() throws Exception { final ProcessDeploymentInfo processDeploymentInfo = mock(ProcessDeploymentInfo.class); when(processDeploymentInfo.getName()).thenReturn("process Name/é"); when(processDeploymentInfo.getVersion()).thenReturn("process Version ø"); when(processAPI.getProcessDeploymentInfo(1L)).thenReturn(processDeploymentInfo); final String uuid = processFormService.getProcessPath(apiSession, 1L); assertEquals("process%20Name/%C3%A9/process%20Version%20%C3%B8", uuid); }