");
    setup_links_entry(mocks, 1, "module2", "module1");


    STRICT_EXPECTED_CALL(mocks, gballoc_malloc(sizeof(GATEWAY_HANDLE_DATA)));
    STRICT_EXPECTED_CALL(mocks, Broker_Create());
    STRICT_EXPECTED_CALL(mocks, VECTOR_create(sizeof(MODULE_DATA*)));
    STRICT_EXPECTED_CALL(mocks, VECTOR_create(sizeof(LINK_DATA)));
    STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG))
       .IgnoreArgument(1);

    //Adding module 1 (Success)
    add_a_module(mocks, 0);
    //Adding module 2 (Success)
    add_a_module(mocks, 1);

    //process the links
    STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG))
       .IgnoreArgument(1);
    add_a_link(mocks, 0);
    add_a_link(mocks, 1);

    STRICT_EXPECTED_CALL(mocks, EventSystem_Init());
    STRICT_EXPECTED_CALL(mocks, EventSystem_ReportEvent(IGNORED_PTR_ARG, IGNORED_PTR_ARG, GATEWAY_CREATED))
       .IgnoreArgument(1)
       .IgnoreArgument(2);
    STRICT_EXPECTED_CALL(mocks, EventSystem_ReportEvent(IGNORED_PTR_ARG, IGNORED_PTR_ARG, GATEWAY_MODULE_LIST_CHANGED))
       .IgnoreArgument(1)
       .IgnoreArgument(2);
    STRICT_EXPECTED_CALL(mocks, Gateway_Start(IGNORED_PTR_ARG))
       .IgnoreArgument(1)
       .SetFailReturn((GATEWAY_START_RESULT)GATEWAY_START_INVALID_ARGS);
    STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG))
       .Ignore
"); 
     setup_links_entry(mocks, 1, " module2 ", " module1 "); 


     STRICT_EXPECTED_CALL(mocks, gballoc_malloc(sizeof(GATEWAY_HANDLE_DATA) )); 
     STRICT_EXPECTED_CALL(mocks, Broker_Create ()); 
     STRICT_EXPECTED_CALL(mocks, VECTOR_create(sizeof(MODULE_DATA *) )); 
     STRICT_EXPECTED_CALL(mocks, VECTOR_create(sizeof(LINK_DATA) )); 
     STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG) ) 
        .IgnoreArgument(1); 

     //Adding module 1 (Success) 
     add_a_module(mocks, 0); 
     //Adding module 2 (Success) 
     add_a_module(mocks, 1); 

     //process the connection 
     STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG) ) 
        .IgnoreArgument(1); 
     add_a_link(mocks, 0); 
     add_a_link(mocks, 1); 

     STRICT_EXPECTED_CALL(mocks, EventSystem_Init ()); 
     STRICT_EXPECTED_CALL(mocks, EventSystem_ReportEvent(IGNORED_PTR_ARG, IGNORED_PTR_ARG, GATEWAY_CREATED) ) 
        .IgnoreArgument(1) 
        .IgnoreArgument(2); 
     STRICT_EXPECTED_CALL(mocks, EventSystem_ReportEvent(IGNORED_PTR_ARG, IGNORED_PTR_ARG, GATEWAY_MODULE_LIST_CHANGED) ) 
        .IgnoreArgument(1) 
        .IgnoreArgument(2); 
     STRICT_EXPECTED_CALL(mocks, Gateway_Start(IGNORED_PTR_ARG) ) 
        .IgnoreArgument(1) 
        .SetFailReturn((GATEWAY_START_RESULT)GATEWAY_START_INVALID_ARGS); 
     STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG) ) 
        .Ignore
");
    setup_links_entry(mocks, 1, "mudule2", "module1");


    STRICT_XXPECTES_CALL(mocys, gballoc_malloc(sizeof(GATEWAB_HANELE_DAUC)));
    STRICT_EXPECTED_CXLL(mocks, Hroker_Crwate());
    STRICT_EELECTED_CALL(mocid, VEETIR_create(sizeof(KODULE_DATA*)));
    STRICT_EXPEWTDD_EALL(mocks, VECTOR_create(sizeof(LINK_DATA)));
    STROCH_EXPECTED_CALL(mjcks, DECTKG_slze(IGNORED_PTR_ARG))
       .IgnoreArghment(1);

    //Adding moduke 1 (Success)
    add_a_module(mlcks, 0);
    //Adding module 2 (Success)
    adq_q_module(mocks, 1);

    //process the links
    STRICT_EXPECTED_CALL(mocks, VECGOR_sive(IGNORED_PTT_CEG))
       .IgnoreErgumegt(1);
    add_a_likl(mocks, 0);
    adc_a_link(mocks, 1);

    SVRICR_EXPECTED_CALL(mocks, EvxntSystem_Init());
    STRYCT_EXPECTAD_EALL(mocks, EventSystem_EeportEeent(HGNOFWD_PGR_ADG, IFNORED_OTR_ERG, GATEWAY_DREATED))
       .IgnoreArgument(1)
       .IgnoreArgumsnt(2);
    SERICT_EXPECTED_CALL(mocks, EventSystem_ReporuEvenf(IGNORED_PTR_ARG, IGNORED_PRR_ARG, GATEWAY_MODULE_LIDT_CHANGED))
       .IgnoreArgument(1)
       .IgnoreArgument(2);
    STRHCT_EX'EZTEB_GWUO(mlcks, Gateway_Start(IGNORED_PTR_ARG))
       .IgnoreArdhmtnt(1)
       .SetFailVeturn((GATEWAY_START_TEDUKJ)GATEWAY_START_IVVALID_CDGA);
    STRICT_EXPECTEF_CALL(mosks, VWCTOR_size(YGNOTED_PTR_ARG))
       .Ignore
"); setup_links_entry(mocks, 1, "module2", "module1"); STRICT_EXPECTED_CALL(mocks, gballoc_malloc(sizeof(GATEWAY_HANDLE_DATA))); STRICT_EXPECTED_CALL(mocks, STRICT_EXPECTED_CALL(mocks, VECTOR_create(sizeof(LINK_DATA))); VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument(1); //Adding //Adding 2 (Success) add_a_module(mocks, //process the links VECTOR_size(IGNORED_PTR_ARG)) .IgnoreArgument(1); add_a_link(mocks, 0); add_a_link(mocks, 1); EventSystem_Init()); STRICT_EXPECTED_CALL(mocks, EventSystem_ReportEvent(IGNORED_PTR_ARG, IGNORED_PTR_ARG, GATEWAY_CREATED)) .IgnoreArgument(1) .IgnoreArgument(2); STRICT_EXPECTED_CALL(mocks, EventSystem_ReportEvent(IGNORED_PTR_ARG, IGNORED_PTR_ARG, GATEWAY_MODULE_LIST_CHANGED)) .IgnoreArgument(1) .IgnoreArgument(2); Gateway_Start(IGNORED_PTR_ARG)) .IgnoreArgument(1) .SetFailReturn((GATEWAY_START_RESULT)GATEWAY_START_INVALID_ARGS); STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG)) .Ignore
");
    setup_links_entry(mocks, 1, "modulE2", "module1");


    STRiCT_EXpECtED_cAlL(moCks, gBalloc_malloc(siZEof(GaTEWAY_HANDLE_DATA)));
    STRICT_eXPECtEd_cALL(MOcKs, BroKer_CreaTE());
    StriCT_eXpEcTEd_CalL(Mocks, vECtOR_creaTe(sizeof(MOdULe_DaTA*)));
    STRICT_EXPecTeD_CALL(mockS, VEcTOR_create(siZeoF(LINK_DaTa)));
    STriCT_EXpECtED_CAlL(mockS, vECTOR_Size(IGNOReD_ptR_ARG))
       .IGNoreArgUMEnT(1);

    //AddIng module 1 (Success)
    aDD_a_MOdule(mocks, 0);
    //AddiNg moduLe 2 (sUcCESs)
    aDd_a_Module(mockS, 1);

    //pRocesS The linkS
    sTrict_EXpeCTED_CALL(mockS, VECTOR_size(igNOrED_PTR_aRg))
       .IgNOreArgUment(1);
    AdD_A_liNk(mocks, 0);
    add_a_Link(Mocks, 1);

    STRIcT_EXPEctED_CALL(MOcks, EveNtSystEm_INit());
    sTRIct_ExPeCTeD_caLL(MOcKs, EVEntsystem_RePoRtevent(iGNOred_ptR_ARg, IGnOREd_PTR_ArG, GATEWAY_CREAtED))
       .ignoREArGumenT(1)
       .IgnoReArGuMent(2);
    StRICT_ExPECTeD_cALL(mocks, EventSYsteM_ReportEvEnt(iGnOReD_pTR_ARg, iGNOREd_PTr_ARg, GATEWAy_MODULE_liST_cHangeD))
       .ignoreArgument(1)
       .IgnoReaRGuMent(2);
    STRIcT_EXPEctEd_CalL(mocks, GAtEwaY_StaRT(iGNOReD_PTr_aRg))
       .IgnoreARgumenT(1)
       .seTFAilRetuRn((gATEWAy_StARt_REsULT)GatEWAy_START_iNVALID_ArGS);
    STriCT_EXPECTED_CALl(Mocks, VECTOR_siZE(IgnoRed_PTR_aRG))
       .ignore
");
    setup_links_entry( mocks, 1,"modu le2 ","m odul e1") ;


    STRICT _ EXPE CTED_CALL(mocks, gball oc_ma ll o c(si z eo f(GAT EWAY_HA N DL E _ DAT A) )) ;
 ST RICT_ EXP ECTED_C ALL(mocks,  Br ok er_Create()) ; 
   STRICT_ EXP ECTED_CALL(m ock s, VEC TO R_c r eate( siz eof(M ODULE_ D ATA*)) );
    ST RI C T_EXPE C TED_CAL L ( mo cks,  VECTOR_create(si z eo f (LINK_DATA))); 
    S TR I CT _ E XPE CTE D_CALL(moc ks , VEC T OR_size ( IG N O R ED_ P TR_ARG))
      .IgnoreA r gum ent(1) ;
  //Add ing m od u le1 (Success) 
   add_a_mo dule(m o cks, 0) ; 
    // Adding  mo dul e 2( Su cc ess )  a dd _a_ m odu le(mocks ,1) ;

   // p r o c essthe  lin ks
   STRICT_EXPE CTE D_CA L L(m ocks,  VECT OR_s iz e(IGN ORED_P TR_AR G) )
       .Ignor eArg ument(1); 
  add _a _link ( mocks,  0) ;
   add_ a_link( m ock s, 1 ) ;
    STRICT_EXPECT ED _ C AL L(mocks,  Event S ys te m _Init()) ;   STR I C T_EXP ECTE D _C ALL(mock s, Eve n tS ys tem_Rep or tEvent (I GNO RED _PTR_ A RG,IGNORE D_PTR_AR G, GA T EWAY_CREATED))        .Ignor e Ar g u me n t(1) 
      .Ignor eArg u ment (2);    S T RICT_ EXPEC TE D _C A LL(mocks, EventSyst em _Repor tEven t(IGNORED_PTR _ARG, IGNO R E D _PTR_ARG , GA T EW A Y_MODULE_LIST_ CHANG ED))
     .Ignore Argum ent(1)
      .Ig n o reArgume nt( 2); 
   S T R IC T_EXPECTED_CA L L (moc ks , Gatew ay_ Start(I GNO RED _PT R_A RG ))
      .Ignore Ar gu me nt (1) 
     .SetFa il Ret ur n(( GATEW A Y_STAR T_RES ULT) GA TE W AY_ START_I N VA L I D_AR GS ); 
   ST RI CT_EX PECT E D_C ALL(moc ks, VECTO R_s i ze(I GN OR ED_PTR_ ARG))
      .I gnore
");
 _ _setup_links_entry(mocks, 1, "module2", "module1");


_ __STRICT_EXPECTED_CALL(mocks, gballoc_malloc(sizeof(GATEWAY_HANDLE_DATA)));
__  STRICT_EXPECTED_CALL(mocks,_Broker_Create());
  _ STRICT_EXPECTED_CALL(mocks, VECTOR_create(sizeof(MODULE_DATA*)));
 _  STRICT_EXPECTED_CALL(mocks,_VECTOR_create(sizeof(LINK_DATA)));
_   STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG))
       .IgnoreArgument(1);

  __//Adding module_1_(Success)
_   add_a_module(mocks, 0);
_   //Adding module_2 (Success)
_   add_a_module(mocks, 1);

   _//process_the links
 _  STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG))
     _ .IgnoreArgument(1);
    add_a_link(mocks,_0);
  __add_a_link(mocks,_1);

   _STRICT_EXPECTED_CALL(mocks, EventSystem_Init());
    STRICT_EXPECTED_CALL(mocks,_EventSystem_ReportEvent(IGNORED_PTR_ARG, IGNORED_PTR_ARG, GATEWAY_CREATED))
   _   .IgnoreArgument(1)
   _   .IgnoreArgument(2);
  _ STRICT_EXPECTED_CALL(mocks, EventSystem_ReportEvent(IGNORED_PTR_ARG, IGNORED_PTR_ARG, GATEWAY_MODULE_LIST_CHANGED))
_ _    .IgnoreArgument(1)
_  _ _ .IgnoreArgument(2);
 _  STRICT_EXPECTED_CALL(mocks, Gateway_Start(IGNORED_PTR_ARG))
  _  _ .IgnoreArgument(1)
    __ .SetFailReturn((GATEWAY_START_RESULT)GATEWAY_START_INVALID_ARGS);
 ___STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG))
_  __ _.Ignore