def testAddTabWithComponentOnly(self):
        tabSheet = TabSheet()
        tab1 = tabSheet.addTab(Label('aaa'))
        tab2 = tabSheet.addTab(Label('bbb'))
        tab3 = tabSheet.addTab(Label('ccc'))

        # Check right order of tabs
        self.assertEquals(0, tabSheet.getTabPosition(tab1))
        self.assertEquals(1, tabSheet.getTabPosition(tab2))
        self.assertEquals(2, tabSheet.getTabPosition(tab3))

        # Calling addTab with existing component does not move tab
        tabSheet.addTab(tab1.getComponent())

        # Check right order of tabs
        self.assertEquals(0, tabSheet.getTabPosition(tab1))
        self.assertEquals(1, tabSheet.getTabPosition(tab2))
        self.assertEquals(2, tabSheet.getTabPosition(tab3))