public void testSubstituteDestructive() {
    System.out.println("\n*** testSubstituteDestructive ***");
    try {
      CycFormulaSentence sentence = getCyc().makeCycSentence("(#$likesAsFriend ?X ?Y)");
      sentence =
              sentence.substituteNonDestructive(CycObjectFactory.makeCycVariable("X"), CycObjectFactory.makeCycVariable("Z"));
      assertTrue(sentence.equalsAtEL(getCyc().makeCycSentence("(#$likesAsFriend ?Z ?Y)")));
    } catch (Exception e) {
      failWithException(e);
    }
    System.out.println("*** testSubstituteDestructive OK ***");
  }