@Test
public void testAddNode() throws Exception {

    waitForFullMesh(2000);
    IStoreClient<String, String> client0 =
            syncManagers[0].getStoreClient("global", 
                                           String.class, String.class);
    IStoreClient<String, String> client1 =
            syncManagers[1].getStoreClient("global", 
                                           String.class, String.class);
    client0.put("key", "value");
    waitForValue(client1, "key", "value", 2000, "client1");
    
    nodes.add(new Node("localhost", 40105, (short)5, (short)5));
    SyncManager[] sms = Arrays.copyOf(syncManagers, 
                                      syncManagers.length + 1);
    FloodlightModuleContext[] fmcs =
            Arrays.copyOf(moduleContexts,
                          moduleContexts.length + 1);
    sms[syncManagers.length] = new SyncManager();
    fmcs[moduleContexts.length] = new FloodlightModuleContext();
    nodeString = mapper.writeValueAsString(nodes);
    setupSyncManager(fmcs[moduleContexts.length],
                     sms[syncManagers.length],
                     nodes.get(syncManagers.length));
    syncManagers = sms;
    moduleContexts = fmcs;
    for(int i = 0; i < 4; i++) {
        moduleContexts[i].addConfigParam(syncManagers[i],
                                         "nodes", nodeString);
        syncManagers[i].doUpdateConfiguration();
    }
    waitForFullMesh(2000);
    IStoreClient<String, String> client4 =
            syncManagers[4].getStoreClient("global", 
                                           String.class, String.class);
    client4.put("newkey", "newvalue");
    waitForValue(client4, "key", "value", 2000, "client4");
    waitForValue(client0, "newkey", "newvalue", 2000, "client0");
}