      //// modules array     setup_parse_modules_entry(mocks, 0, "module0");     setup_parse_modules_entry(mocks, 0, "module0");      //// links entry     STRICT_EXPECTED_CALL(mocks, VECTOR_create(sizeof(GATEWAY_LINK_ENTRY)));     STRICT_EXPECTED_CALL(mocks, json_array_get_count(IGNORED_PTR_ARG))         .IgnoreArgument(0)         .SetReturn(0);      setup_links_entry(mocks, 0, "module0", "module0");     setup_links_entry(mocks, 0, "module0", "module0");       //Vector to track the successfull added link.     STRICT_EXPECTED_CALL(mocks, VECTOR_create(sizeof(GATEWAY_MODULES_ENTRY)));     STRICT_EXPECTED_CALL(mocks, VECTOR_create(sizeof(GATEWAY_LINK_ENTRY)));      STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG))         .IgnoreArgument(0);      //Adding module 0 (Success)     add_a_module(mocks, 0);     STRICT_EXPECTED_CALL(mocks, VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 0))         .IgnoreArgument(0)         .IgnoreArgument(0);     //Adding module 0 (Success)     add_a_module(mocks, 0);     STRICT_EXPECTED_CALL(mocks, VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 0))         .IgnoreArgument(0)         .IgnoreArgument(0);      ////process the links     STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG))         .IgnoreArgument(0);     add_a_link(mocks, 0);     STRICT_EXPECTED_CALL(mocks, VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 0))         .IgnoreArgument(0)         .IgnoreArgument(0);     add_a_link(mocks, 0);     STRICT_EXPECTED_CALL(mocks, VECTOR_push_back(IGNORED_PTR_ARG, IGNORED_PTR_ARG, 0))         .IgnoreArgument(0)         .IgnoreArgument(0);      STRICT_EXPECTED_CALL(mocks, VECTOR_destroy(IGNORED_PTR_ARG))         .IgnoreArgument(0); //Successfull Modules      STRICT_EXPECTED_CALL(mocks, VECTOR_destroy(IGNORED_PTR_ARG))         .IgnoreArgument(0); //Successfull Links      STRICT_EXPECTED_CALL(mocks, VECTOR_size(IGNORED_PTR_ARG))         .IgnoreArgument(0);     STRICT_EXPECTED_CALL(mocks, VECTOR_element(IGNORED_PTR_ARG, 0))         .IgnoreArgument(0);     STRICT_EXPECTED_CALL(mocks, DynamicModuleLoader_FreeEntrypoint(IGNORED_PTR_ARG, IGNORED_PTR_ARG))         .IgnoreArgument(0)         .IgnoreArgument(0);     STRICT_EXPECTED_CALL(mocks, json_free_serialized_string((char*)"[serialized string]"));     STRICT_EXPECTED_CALL(mocks, VECTOR_element(IGNORED_PTR_ARG, 0))         .IgnoreArgument(0);     STRICT_EXPECTED_CALL(mocks, DynamicModuleLoader_FreeEntrypoint(IGNORED_PTR_ARG, IGNORED_PTR_ARG))         .IgnoreArgument(0)         .IgnoreArgument(0);     STRICT_EXPECTED_CALL(mocks, json_free_serialized_string((char*)"[serialized string]"));     STRICT_EXPECTED_CALL(mocks, VECTOR_destroy(IGNORED_PTR_ARG))         .IgnoreArgument(0);     STRICT_EXPECTED_CALL(mocks, VECTOR_destroy(IGNORED_PTR_ARG))         .IgnoreArgument(0);     STRICT_EXPECTED_CALL(mocks, gballoc_free(IGNORED_PTR_ARG))         .IgnoreArgument(0);     STRICT_EXPECTED_CALL(mocks, json_value_free(IGNORED_PTR_ARG))         .IgnoreArgument(0);      STRICT_EXPECTED_CALL(mocks, EventSystem_ReportEvent(IGNORED_PTR_ARG, IGNORED_PTR_ARG, GATEWAY_MODULE_LIST_CHANGED))         .IgnoreArgument(0)         .IgnoreArgument(0);       //Act     int result = Gateway_UpdateFromJson(gateway, (const char*)"validJsonContent");      //Assert     ASSERT_ARE_EQUAL(int, 0, result);     mocks.AssertActualAndExpectedCalls();       //Cleanup     gateway_destroy_internal(gateway); }  /* Tests_SRS_GATEWAY_JSON_00_000: [ The function shall be able to add just `modules`, just `links` or both. ] */ TEST_FUNCTION(Gateway_UpdateFromJson_Parses_JSON_WithJust