TestExtension extension = getRepositoryTestUtils().getTestExtension(extensionId, "xar");
getRepositoryTestUtils().addExtension(extension);
// Check if the section links point to the right repository.
ExtensionAdministrationPage adminPage = ExtensionAdministrationPage.gotoPage().clickAddExtensionsSection();
Select repositorySelect = adminPage.getSearchBar().getRepositorySelect();
Assert.assertEquals("All Extensions", repositorySelect.getFirstSelectedOption().getText());
adminPage = adminPage.clickCoreExtensionsSection();
repositorySelect = adminPage.getSearchBar().getRepositorySelect();
Assert.assertEquals("Core extensions", repositorySelect.getFirstSelectedOption().getText());
adminPage = adminPage.clickInstalledExtensionsSection();
repositorySelect = adminPage.getSearchBar().getRepositorySelect();
Assert.assertEquals("Installed extensions", repositorySelect.getFirstSelectedOption().getText());
// Check that a remote extension appears only in the list of "All Extensions".
SearchResultsPane searchResults = adminPage.getSearchBar().search("alice");
Assert.assertNull(searchResults.getExtension(extensionId));