public void addSpeaker(BgpSpeakerConfig speaker) {
        // Create the new speaker node and set the parameters
        ObjectNode speakerNode = JsonNodeFactory.instance.objectNode();
        speakerNode.put(NAME, speaker.name().get());
        speakerNode.put(VLAN, speaker.vlan().toString());
        speakerNode.put(CONNECT_POINT, speaker.connectPoint().elementId().toString()
                + "/" + speaker.connectPoint().port().toString());

        ArrayNode peersNode = speakerNode.putArray(PEERS);
        for (IpAddress peerAddress: speaker.peers()) {
            peersNode.add(peerAddress.toString());
        }

        // Add the new BGP speaker to the existing node array
        ArrayNode speakersArray = bgpSpeakers().isEmpty() ?
                initBgpSpeakersConfiguration() : (ArrayNode) object.get(SPEAKERS);
        speakersArray.add(speakerNode);
    }
@Test
    public void testAddSpeaker() throws Exception {
        int initialSize = bgpConfig.bgpSpeakers().size();
        BgpConfig.BgpSpeakerConfig newSpeaker = createNewSpeaker();
        bgpConfig.addSpeaker(newSpeaker);
        assertEquals(initialSize + 1, bgpConfig.bgpSpeakers().size());
        speakers.add(newSpeaker);
        assertEquals(speakers, bgpConfig.bgpSpeakers());
    }