}
@Test
@SuppressWarnings("unchecked")
public void testClonesCloudSolrServerForCoreCorrectlyWhenCoreNameIsNotEmpty() throws MalformedURLException {
LBHttpSolrServer lbSolrServer = new LBHttpSolrServer(BASE_URL, ALTERNATE_BASE_URL);
CloudSolrServer cloudServer = new CloudSolrServer(ZOO_KEEPER_URL, lbSolrServer);
CloudSolrServer clone = SolrServerUtils.clone(cloudServer, CORE_NAME);
Assert.assertEquals(ZOO_KEEPER_URL, ReflectionTestUtils.getField(clone, FIELD_ZOO_KEEPER));
LBHttpSolrServer lbClone = clone.getLbServer();
Map<String, ?> aliveServers = (Map<String, ?>) ReflectionTestUtils.getField(lbClone, FIELD_ALIVE_SERVERS);
Assert.assertThat(aliveServers.keySet(), hasItems(CORE_URL, ALTERNATE_CORE_URL));
assertLBHttpSolrServerProperties(lbSolrServer, lbClone);
Assert.assertThat(clone.getDefaultCollection(), equalTo(CORE_NAME));