public @NotNull ListAssert endsWith(@NotNull Object... sequence) {
    isNotNull();
    checkNotNull(sequence);
    int sequenceSize = sequence.length;
    int listSize = actualGroupSize();
    if (sequenceSize == 0 && listSize == 0) {
      return this;
    }
    if (sequenceSize == 0 && listSize != 0) {
      failIfNotEndingWithSequence(sequence);
    }
    if (listSize < sequenceSize) {
      failIfNotEndingWithSequence(sequence);
    }
    for (int i = 0; i < sequenceSize; i++) {
      int sequenceIndex = sequenceSize - 1 - i;
      int listIndex = listSize - 1 - i;
      if (!areEqual(sequence[sequenceIndex], actual.get(listIndex))) {
        failIfNotEndingWithSequence(sequence);
      }
    }
    return this;
  }
public @NotNull ListAssert endsWith(@NotNull Object... sequence) {
    isNotNull();
    checkNotNull(sequence);
    int sequenceSize = sequence.length;
    int listSize = actualGroupSize();
    if (sequenceSize == 0 && listSize == 0) {
      return this;
    }
    if (sequenceSize == 0 && listSize != 0) {
      failIfNotEndingWithSequence(sequence);
    }
    if (listSize < sequenceSize) {
      failIfNotEndingWithSequence(sequence);
    }
    for (int i = 0; i < sequenceSize; i++) {
      int sequenceIndex = sequenceSize - 1 - i;
      int listIndex = listSize - 1 - i;
      if (!areEqual(sequence[sequenceIndex], actual.get(listIndex))) {
        failIfNotEndingWithSequence(sequence);
      }
    }
    return this;
  }
public @ NotNull ListAssert endsWith ( @ NotNull Object ... sequence ) { isNotNull ( ) ; checkNotNull ( sequence ) ; int sequenceSize = sequence . length ; int listSize = actualGroupSize ( ) ; if ( sequenceSize == 0 && listSize == 0 ) { return this ; } if ( sequenceSize == 0 && listSize != 0 ) { failIfNotEndingWithSequence ( sequence ) ; } if ( listSize < sequenceSize ) { failIfNotEndingWithSequence ( sequence ) ; } for ( int i = 0 ; i < sequenceSize ; i ++ ) { int sequenceIndex = sequenceSize - 1 - i ; int listIndex = listSize - 1 - i ; if ( ! areEqual ( sequence [ sequenceIndex ] , actual . get ( listIndex ) ) ) { failIfNotEndingWithSequence ( sequence ) ; } } return this ; }
Verifies that the actual {@code List} ends with the given sequence of objects, without any other objects between
them. Same as {@link #containsSequence}, but verifies also that last given object is also last element of
{@code List}.

@param sequence the sequence of objects to look for.
@return this assertion object.
@throws AssertionError if the actual {@code List} is {@code null}.
@throws AssertionError if the given array is {@code null}.
@throws AssertionError if the actual {@code List} is not empty and with the given sequence of objects is empty.
@throws AssertionError if the actual {@code List} does not end with the given sequence of objects.
Verifies that the actual { @code List } ends with the given sequence of objects without any other objects between them . Same as { @link #containsSequence } but verifies also that last given object is also last element of { @code List } .