// ServerSetChange when New Set includes CurrentServer
{
Assert.assertEquals(bsPuller.getCurrentServerIdx() != -1, true, "Current Server Index defined");
Assert.assertEquals(bsPuller.getCurentServer() != null, true, "Current Server not Null");
ServerInfo oldServer = bsPuller.getCurentServer();
Assert.assertEquals(bsPuller.getServers(),EXP_SERVERINFO_1,"Server Set");
Map<Long, List<RegisterResponseEntry>> entries = new HashMap<Long, List<RegisterResponseEntry>>();
entries.put(1L, new ArrayList<RegisterResponseEntry>());
connState.setSourcesSchemas(entries);
doExecuteAndChangeState(bsPuller,createSetServerMessage(true, bsPuller));
Assert.assertEquals(bsPuller.getCurrentServerIdx() != -1, true, "Current Server Index defined");
Assert.assertEquals(bsPuller.getCurentServer(), oldServer, "Current Server unchanged");
Assert.assertEquals(bsPuller.getServers(),EXP_SERVERINFO_2,"Server Set");
Assert.assertEquals(bsPuller.toTearConnAfterHandlingResponse(), false, "Tear Conn After Handling Response");
Assert.assertEquals(connState.getStateId(),StateId.START_SCN_RESPONSE_SUCCESS, "ServerSetChange while START_SCN_RESPONSE_SUCCESS");
Assert.assertEquals(bsPuller.getQueueListString(), "RelayPuller queue: [START_SCN_RESPONSE_SUCCESS]", "Queue :ServerSetChange while START_SCN_RESPONSE_SUCCESS");
}
// ServerSetChange when New Set excludes CurrentServer and SuccessFul Response
{
int oldServerIndex = bsPuller.getCurrentServerIdx();
ServerInfo oldServer = bsPuller.getCurentServer();
Assert.assertEquals(bsPuller.getServers(),EXP_SERVERINFO_2,"Server Set");
Map<Long, List<RegisterResponseEntry>> entries = new HashMap<Long, List<RegisterResponseEntry>>();
entries.put(1L, new ArrayList<RegisterResponseEntry>());
connState.setSourcesSchemas(entries);