public void testGetArg2() {
    System.out.println("\n**** testGetArg2 ****");

    CycAccess cycAccess = null;
    try {
      try {
        if (connectionMode == LOCAL_CYC_CONNECTION) {
          cycAccess = new CycAccess(testHostName, testBasePort);
        } else if (connectionMode == SOAP_CYC_CONNECTION) {
          cycAccess = new CycAccess(endpointURL, testHostName, testBasePort);
        } else {
          fail("Invalid connection mode " + connectionMode);
        }
      } catch (Throwable e) {
        fail(StringUtils.getStringForException(e));
      }

      try {
        CycFort cycAdministrator = cycAccess.getKnownConstantByName("CycAdministrator");
        Object obj = cycAccess.getArg2(isa, cycAdministrator);
        assertNotNull(obj);
        assertTrue(obj instanceof CycFort || obj instanceof CycList);
        if (!cycAccess.isOpenCyc()) {
          final String predName = "scientificName";
          final String termName = "Emu";
          final String mtName = "AllEnglishValidatedLexicalMicrotheoryPSC";
          obj = cycAccess.getArg2(predName, termName, mtName);
          System.out.println(obj);
          assertNotNull(obj);
          CycFort predicate = cycAccess.getKnownConstantByName(predName);
          CycFort arg1 = cycAccess.getKnownConstantByName(termName);
          CycFort mt = cycAccess.getKnownConstantByName(mtName);
          obj = cycAccess.getArg2(predicate, arg1, mt);
          System.out.println(obj);
          assertNotNull(obj);
        }
      } catch (Throwable e) {
        e.printStackTrace();
        fail(e.toString());
      }
    } finally {
      if (cycAccess != null) {
        cycAccess.close();
        cycAccess = null;
      }
    }
    System.out.println("**** testGetArg2 OK ****");
  }