@Override
    public void createAgent(OFAgent ofAgent) {
        checkNotNull(ofAgent, ERR_NULL_OFAGENT);
        if (ofAgent.state() == STARTED) {
            log.warn(String.format(MSG_OFAGENT, ofAgent.networkId(), ERR_IN_USE));
            return;
        }
        // TODO check if the virtual network exists
        ofAgentStore.createOfAgent(ofAgent);
        log.info(String.format(MSG_OFAGENT, ofAgent.networkId(), MSG_CREATED));
    }
@Test(expected = IllegalArgumentException.class)
    public void testCreateDuplicateAgent() {
        target.createAgent(OFAGENT_1);
        target.createAgent(OFAGENT_1);
    }