RelationalSymbolicValue extends BinarySymbolicValue { @VisibleForTesting SymbolicValue differentOperand(RelationalSymbolicValue other) { Preconditions.checkState(potentiallyTransitiveWith(other), "%s is not in transitive relationship with %s", this, other); return other.hasOperand(leftOp) ? rightOp : leftOp; } RelationalSymbolicValue(Kind kind); @VisibleForTesting  RelationalSymbolicValue(Kind kind, SymbolicValue leftOp, SymbolicValue rightOp); @Override List<ProgramState> setConstraint(ProgramState initialProgramState, BooleanConstraint booleanConstraint); @Override boolean equals(Object o); boolean isEquality(); @Override int hashCode(); @Override String toString(); @VisibleForTesting Kind kind();  }
@Test void test_different_operand() throws Exception { RelationalSymbolicValue ab = new RelationalSymbolicValue(EQUAL, a, b); RelationalSymbolicValue bc = new RelationalSymbolicValue(EQUAL, b, c); assertThat(ab.differentOperand(bc)).isEqualTo(a); assertThat(bc.differentOperand(ab)).isEqualTo(c); }