### Question:
ProcessEngineClient { public List<DataDefinition> getProcessDataDefinitions(final long processId) { try { return processAPI.getProcessDataDefinitions(processId, 0, Integer.MAX_VALUE); } catch (final ProcessDefinitionNotFoundException e) { throw new APIException(new _("Unable to get process data definitions, process %processId% not found", new Arg("processId", processId))); } } ProcessEngineClient(final ProcessAPI processAPI); ProcessDeploymentInfo getProcessDeploymentInfo(final long processId); ProcessAPI getProcessApi(); ProcessDefinition deploy(final BusinessArchive businessArchive); void enableProcess(final long processId); void disableProcess(final long processId); ProcessDeploymentInfo updateProcessDeploymentInfo(final long processId, final ProcessDeploymentInfoUpdater processDeploymentInfoUpdater); void deleteDisabledProcesses(final List<Long> processIds); void deleteArchivedProcessInstancesByBunch(final long processId, final int bunchSize, final List<Long> processesAllowedToBeDeletedIds); void deleteProcessInstancesByBunch(final long processId, final int bunchSize, final List<Long> processesAllowedToBeDeletedIds); SearchResult<ProcessDeploymentInfo> searchProcessDefinitions(final SearchOptions searchOptions); SearchResult<ProcessDeploymentInfo> searchUncategorizedProcessDefinitionsSupervisedBy(final long userId, final SearchOptions searchOptions); SearchResult<ProcessDeploymentInfo> searchProcessDefinitionsSupervisedBy(final long userId, final SearchOptions searchOptions); SearchResult<ProcessDeploymentInfo> searchUncategorizedProcessDefinitionsUserCanStart(final long userId, final SearchOptions searchOptions); SearchResult<ProcessDeploymentInfo> searchRecentlyStartedProcessDefinitions(final long userId, final SearchOptions searchOptions); long countResolvedProcesses(); SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksSupervisedBy(final long supervisorId,
            final SearchOptions searchOptions); SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasks(final SearchOptions searchOptions); SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfosWithAssignedOrPendingHumanTasksFor(final long userId,
            final SearchOptions searchOptions); SearchResult<ProcessDeploymentInfo> searchProcessDeploymentInfos(final long userId, final SearchOptions searchOptions); List<DataDefinition> getProcessDataDefinitions(final long processId);  }### Answer:
@Test(expected = Exception.class) public void getProcessDataDefinitions_throw_exception_if_process_definition_is_not_found() throws Exception { when(processAPI.getProcessDataDefinitions(anyLong(), anyInt(), anyInt())).thenThrow(new ProcessDefinitionNotFoundException("")); processEngineClient.getProcessDataDefinitions(1L); }
@Test public void getProcessDataDefinitions_get_all_process_data_definition() throws Exception { final long expectedProcessId = 1L; processEngineClient.getProcessDataDefinitions(expectedProcessId); verify(processAPI).getProcessDataDefinitions(expectedProcessId, 0, Integer.MAX_VALUE); }