### Question:
TabSheetArea extends TabSheet implements Area { @Override public void reloadBindings() { Component selectedTab = getSelectedTab(); if (selectedTab != null && selectedTab instanceof Page) { ((Page)selectedTab).reloadBindings(); } } TabSheetArea();  TabSheetArea(boolean preserveHeader); @PostConstruct final void init(); @Deprecated TabSheet getTabSheet(); @Override void reloadBindings();  }### Answer:
@Test public void testAddTab_RefreshesFirstTabPage() { TabSheetArea tabSheetArea = new TestArea(); Page tabPage1 = mock(Page.class); Page tabPage2 = mock(Page.class); verify(tabPage1, times(0)).reloadBindings(); verify(tabPage2, times(0)).reloadBindings(); tabSheetArea.addTab(tabPage1, "1"); tabSheetArea.addTab(tabPage2, "2"); verify(tabPage1, times(1)).reloadBindings(); verify(tabPage2, times(0)).reloadBindings(); }
@Test public void testTabSelectionRefreshesPage() { TabSheetArea tabSheetArea = new TestArea(); Page tabPage1 = mock(Page.class); Page tabPage2 = mock(Page.class); tabSheetArea.addTab(tabPage1, "1"); tabSheetArea.addTab(tabPage2, "2"); verify(tabPage2, times(0)).reloadBindings(); tabSheetArea.setSelectedTab(1); verify(tabPage2, times(1)).reloadBindings(); }