code: public static final void assertProcessEnded(final String processInstanceId) {
          Validate.notNull(processInstanceId);
  
          apiCallback.debug(LogMessage.PROCESS_5, processInstanceId);
          try {
              getProcessInstanceAssertable().processIsEnded(processInstanceId);
          } catch (final AssertionError ae) {
              apiCallback.fail(ae, LogMessage.ERROR_PROCESS_2, processInstanceId);
          }
      }
docs: Asserts the process instance with the provided id is ended.
  
  @param processInstanceId
  the process instance's id to check for. May not be <code>null</code>