def testJavaListSetSlice(self):
        ex = self.gateway.getNewExample()
        pList = get_list(6)
        jList = ex.getList(6)
        tList = ["500", "600"]

        pList[0:0] = tList
        jList[0:0] = tList
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        pList[1:2] = tList
        jList[1:2] = tList
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        pList[3:5] = tList
        jList[3:5] = tList
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        pList[1:5:2] = tList
        jList[1:5:2] = tList
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        pList[0:4] = tList
        jList[0:4] = tList
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        pList = get_list(6)
        jList = ex.getList(6)
        try:
            pList[0:6:2] = tList
            self.fail("Should have failed")
        except ValueError:
            self.assertTrue(True)
        try:
            jList[0:6:2] = tList
            self.fail("Should have failed")
        except __HOLE__:
            self.assertTrue(True)

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

        pList = get_list(6)
        jList = ex.getList(6)

        pList[100:100] = tList
        jList[100:100] = tList
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        pList[1000:10000] = tList
        jList[1000:10000] = tList
        self.assertEqual(len(pList), len(jList))
        self.assertEqual(str(pList), str(jList))

        try:
            self.assertTrue(jList.equals(pList))
            self.fail("Should have failed")
        except Exception:
            self.assertTrue(True)
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/py4j-0.9/src/py4j/tests/java_list_test.py/ListTest.testJavaListSetSlice