private boolean HLIDGenerationTest(Object obj, CycAccess cyc) {
    try {
      String cmd = "(compact-hl-external-id-string "
              + DefaultCycObject.stringApiValue(obj) + ")";
      String cycId = cyc.converseString(cmd);
      String apiId = null;
      if (obj instanceof String) {
        apiId = CompactHLIDConverter.converter().toCompactHLId((String) obj);
        assertTrue(CompactHLIDConverter.converter().isStringCompactHLId(apiId));
      } else if (obj instanceof Number) {
        apiId = CompactHLIDConverter.converter().toCompactHLId((Number) obj);
        assertTrue(CompactHLIDConverter.converter().isNumberCompactHLId(apiId));
      }
      assertTrue(apiId.equals(cycId));
    } catch (Throwable e) {
      fail(e.toString());
    }
    return true;
  }