### Question:
UpgradeCatalog270 extends AbstractUpgradeCatalog { protected String removeAdminHandlers(String content) { return content.replaceAll("(?s)<requestHandler\\s+name=\"/admin/\"\\s+class=\"solr.admin.AdminHandlers\"\\s*/>", ""); } @Inject  UpgradeCatalog270(Injector injector); @Override String getTargetVersion(); @Override String getSourceVersion(); static final String[] COMPONENT_NAME_SERVICE_NAME_CLUSTER_ID_KEY_COLUMNS; static final String[] SERVICE_NAME_CLUSTER_ID_KEY_COLUMNS; static final String AMBARI_INFRA_OLD_NAME; static final String AMBARI_INFRA_NEW_NAME; static final String SERVICE_CONFIG_MAPPING_TABLE; static final String CLUSTER_CONFIG_TABLE; static final String FK_HOSTCOMPONENTDESIREDSTATE_COMPONENT_NAME; static final String FK_HOSTCOMPONENTSTATE_COMPONENT_NAME; static final String FK_SERVICECOMPONENTDESIREDSTATE_SERVICE_NAME; }### Answer:
@Test public void testRemoveAdminHandlers() { UpgradeCatalog270 upgradeCatalog270 = createMockBuilder(UpgradeCatalog270.class) .createMock(); replay(upgradeCatalog270); String updated = upgradeCatalog270.removeAdminHandlers("<requestHandler name=\"/admin/\"\n" + " class=\"solr.admin.AdminHandlers\"/>"); assertThat(updated, is("")); verify(upgradeCatalog270); }