public void assertEndsWith(Description description, List<?> actual, Object[] sequence) {
    """
	Verifies that the given {@code List} ends with the given sequence of objects, without any other objects between
	them. Similar to <code>{@link #assertContainsSequence(Description, List, Object[])}</code>, but it also verifies
	that the last element in the sequence is also the last element of the given {@code List}.
	
	@param description contains information about the assertion.
	@param actual      the given {@code List}.
	@param sequence    the sequence of objects to look for.
	@throws NullPointerException     if the given argument is {@code null}.
	@throws IllegalArgumentException if the given argument is an empty array.
	@throws AssertionError           if the given {@code List} is {@code null}.
	@throws AssertionError           if the given {@code List} does not end with the given sequence of objects.
    """
    checkIsNotNullAndNotEmpty(sequence);
    assertNotNull(description, actual);
    int sequenceSize = sequence.length;
    int sizeOfActual = actual.size();
    if (sizeOfActual < sequenceSize) {
      throw actualDoesNotEndWithSequence(description, actual, sequence);
    }
    int start = actual.size() - sequenceSize;
    int sequenceIndex = 0, indexOfActual = 0;
    for (Object o : actual) {
      if (indexOfActual++ < start) {
        continue;
      }
      if (areEqual(o, sequence[sequenceIndex++])) {
        continue;
      }
      throw actualDoesNotEndWithSequence(description, actual, sequence);
    }
  }
public void assertEndsWith(Description description, List<?> actual, Object[] sequence) {
    checkIsNotNullAndNotEmpty(sequence);
    assertNotNull(description, actual);
    int sequenceSize = sequence.length;
    int sizeOfActual = actual.size();
    if (sizeOfActual < sequenceSize) {
      throw actualDoesNotEndWithSequence(description, actual, sequence);
    }
    int start = actual.size() - sequenceSize;
    int sequenceIndex = 0, indexOfActual = 0;
    for (Object o : actual) {
      if (indexOfActual++ < start) {
        continue;
      }
      if (areEqual(o, sequence[sequenceIndex++])) {
        continue;
      }
      throw actualDoesNotEndWithSequence(description, actual, sequence);
    }
  }
public void assertEndsWith ( Description description , List < ? > actual , Object [ ] sequence ) { checkIsNotNullAndNotEmpty ( sequence ) ; assertNotNull ( description , actual ) ; int sequenceSize = sequence . length ; int sizeOfActual = actual . size ( ) ; if ( sizeOfActual < sequenceSize ) { throw actualDoesNotEndWithSequence ( description , actual , sequence ) ; } int start = actual . size ( ) - sequenceSize ; int sequenceIndex = 0 , indexOfActual = 0 ; for ( Object o : actual ) { if ( indexOfActual ++ < start ) { continue ; } if ( areEqual ( o , sequence [ sequenceIndex ++ ] ) ) { continue ; } throw actualDoesNotEndWithSequence ( description , actual , sequence ) ; } }
Verifies that the given {@code List} ends with the given sequence of objects, without any other objects between
them. Similar to <code>{@link #assertContainsSequence(Description, List, Object[])}</code>, but it also verifies
that the last element in the sequence is also the last element of the given {@code List}.

@param description contains information about the assertion.
@param actual      the given {@code List}.
@param sequence    the sequence of objects to look for.
@throws NullPointerException     if the given argument is {@code null}.
@throws IllegalArgumentException if the given argument is an empty array.
@throws AssertionError           if the given {@code List} is {@code null}.
@throws AssertionError           if the given {@code List} does not end with the given sequence of objects.
Verifies that the given { @code List } ends with the given sequence of objects without any other objects between them . Similar to <code > { @link #assertContainsSequence ( Description List Object [] ) } < / code > but it also verifies that the last element in the sequence is also the last element of the given { @code List } .