```
public class Main{

public static void main(String[] args) {

    final Pair<Integer> p = new DefaultPair<>(3,5);
    p.reverse();
    final Pair<Integer> q = new DefaultPair<>(5,3);
    }

}

public interface Pair<F> {
    F first();
    F second();
    F reverse();
}

public class DefaultPair<F> implements Pair<F> {
    private final F first; 
    private final F second; 
    private F reverseFirst; 
    private F reverseSecond; 

  public DefaultPair(F first, F second){//constructor 
  this.first = first; 
  this.second = second; 
    }

// method that is not working    
 @Override
  public F reverse() {

    this.reverseFirst = second; 
    this.reverseSecond = first; 

    System.out.println(this);
    return (F)this; 
   }

 @Override
 public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((first == null) ? 0 : first.hashCode());
    result = prime * result + ((second == null) ? 0 : second.hashCode());
    return result;
}

@Override
public boolean equals(Object obj) {
    if (this == obj)
        return true;
    if (obj == null)
        return false;
    if (!(obj instanceof DefaultPair))
        return false;
    DefaultPair<F> other = (DefaultPair) obj;
    if (first == null) {
        if (other.first != null)
            return false;
    } else if (!first.equals(other.first))
        return false;
    if (second == null) {
        if (other.second != null)
            return false;
    } else if (!second.equals(other.second))
        return false;
    return true;
 }

@Override
  public F first(){
      return first;
  }

 @Override
  public F second(){
      return second; 
  }

 @Override
 public String toString() {
      return "<" + first + ", " + second + ">";
    }

}

import static org.junit.Assert.*;

import org.junit.Test;

public class TestDefaultPair {

    @Test
    public void test() {
        final Pair<Integer> p = new DefaultPair<>(3, 5);
        final Pair<Integer> q = new DefaultPair<>(5, 3);
         assertEquals(3, p.first().intValue());
         assertEquals(5, p.second().intValue());
         assertEquals("<3, 5>", p.toString());
         assertTrue(p.equals(p));
         assertFalse(p.equals(q));
         assertFalse(q.equals(p));
         assertFalse(p.equals(null));
         assertTrue(p.equals(q.reverse()));//test that is not passing
    }

}

```

I need to have all of the test cases pass. All of them pass besides the last one where I have to invoke the reverse method. The receiver of the reverse method should not be mutated. For example, I should not put in p(3,5) to be reversed. Everything else works besides the reverse method. If i call p.reverse(); and print out p, it prints in the original order.