code: public static void assertProcessEndedAndInEndEvents(final String processInstanceId, final String... endEventIds) {
          Validate.notNull(processInstanceId);
          Validate.notNull(endEventIds);
  
          apiCallback.debug(LogMessage.PROCESS_11, processInstanceId, AssertUtils.arrayToString(endEventIds));
          try {
              getEndEventAssertable().processEndedAndInEndEvents(processInstanceId, endEventIds);
          } catch (final AssertionError ae) {
              apiCallback.fail(ae, LogMessage.ERROR_PROCESS_4, processInstanceId, AssertUtils.arrayToString(endEventIds));
          }
      }
docs: Asserts the process instance with the provided id is ended and has reached <strong>all</strong> end events with
  the provided ids.
  
  <p>
  <strong>Note:</strong> this assertion assumes the process has one or more end events and that all of them have
  been reached (in other words, the exact set of provided end event ids is checked against). The order of the end
  events is not taken into consideration.
  
  @param processInstanceId
  the process instance's id to check for. May not be <code>null</code>
  @param endEventIds
  the end events' ids to check for. May not be <code>null</code>