def testJavaList(self):
        ex = self.gateway.getNewExample()
        pList = get_list(3)
        jList = ex.getList(3)
        pList2 = get_list(3)
        jList2 = ex.getList(3)

        # Lists are not "hashable" in Python. Too bad.
        # self.assertEqual(hash(pList),hash(pList2))
        self.assertEqual(hash(jList), hash(jList2))

        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))
        self.assertEqual(pList, pList2)
        self.assertEqual(jList, jList2)
        pList.append("4")
        jList.append("4")
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        self.assertEqual(pList[0], jList[0])
        self.assertEqual(pList[3], jList[3])

        pList.extend(pList2)
        jList.extend(jList2)
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        self.assertEqual("1" in pList, "1" in jList)
        self.assertEqual("500" in pList, jList in "500")

        pList[0] = "100"
        jList[0] = "100"
        pList[3] = "150"
        jList[3] = "150"
        pList[-1] = "200"
        jList[-1] = "200"
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        pList.insert(0, "100")
        jList.insert(0, "100")
        pList.insert(3, "150")
        jList.insert(3, "150")
        pList.insert(-1, "200")
        jList.insert(-1, "200")
        pList.insert(len(pList), "300")
        jList.insert(len(pList), "300")
        pList.insert(300, "1500")
        jList.insert(300, "1500")
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        self.assertEqual(pList.pop(), jList.pop())
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        self.assertEqual(pList.pop(-1), jList.pop(-1))
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        self.assertEqual(pList.pop(2), jList.pop(2))
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        del pList[0]
        del jList[0]
        del pList[-1]
        del jList[-1]
        del pList[1]
        del jList[1]
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        pList.append("700")
        jList.append("700")
        pList.insert(0, "700")
        jList.insert(0, "700")

        pList.remove("700")
        jList.remove("700")
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        try:
            jList[15]
            self.fail("Should Fail!")
        except IndexError:
            self.assertTrue(True)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/py4j-0.9/src/py4j/tests/java_list_test.py/ListTest.testJavaList/swapped operands of `in`