### Question:
ProcessEngineClient { public ProcessDefinition deploy(final BusinessArchive businessArchive) { try { return getProcessApi().deploy(businessArchive); } catch (final AlreadyExistsException e) { final DesignProcessDefinition processDefinition = businessArchive.getProcessDefinition(); throw new APIException(new _("Process %appName% in version %version% already exists", new Arg("appName", processDefinition.getName()), new Arg( "version", processDefinition.getVersion())), e); } catch (final V6FormDeployException e) { final DesignProcessDefinition processDefinition = businessArchive.getProcessDefinition(); throw new APIException(new _("Process %appName% in version %version% contains 6.x Legacy artifacts (forms or case overview page). Those are based on Google Web Toolkit (GWT), a technology that is no longer supported by Bonita. To know more, check the documentation.", new Arg("appName", processDefinition.getName()), new Arg("version", processDefinition.getVersion())), e); } catch (final Exception e) { throw new APIException(new _("Unable to deploy business archive"), e); } } 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 public void deploying_a_process_with_v6_forms_fails_with_the_right_message() throws AlreadyExistsException, ProcessDeployException { DesignProcessDefinitionImpl designProcessDefinition = new DesignProcessDefinitionImpl("processName", "1.0"); BusinessArchive businessArchive = new BusinessArchive(); businessArchive.setProcessDefinition(designProcessDefinition); when(processAPI.deploy((BusinessArchive) anyObject())).thenThrow(new V6FormDeployException(new Exception("a cause"))); expectedException.expect(APIException.class); processEngineClient.deploy(businessArchive); }