AtsMec_ApplicationPackageLifecycleAndOperationGrantingAPI_TestCases.ttcn 142 KB
Newer Older
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_OK
    
    /**
     * @desc Check that MEO responds with an error when it receives 
     *       a request for deleting an App Package referred with a wrong ID
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_004_NF() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_delete(
                                                         PICS_ROOT_API & PX_MEO_PKGM_URI_ONBOARDED & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")),
                                                         v_headers
                     )));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_404_not_found
                            )) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_004_NF
    
    /**
     * @desc Check that MEO updates the operational state of an individual application package resource
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_005_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_patch(
                                                       PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")),
                                                       v_headers,
                                                       m_http_message_body_json(
                                                                                m_body_json_app_pkg_info_modification(
                                                                                                                      m_app_pkg_info_modification(
                                                                                                                                                  DISABLED
                            ))))));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_ok(
                                                                 mw_http_message_body_json(
                                                                                           mw_body_json_app_pkg_info_modification(
                                                                                                                                  mw_app_pkg_info_modification(
                                                                                                                                                              DISABLED
                            )))))) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_OK
    
    /**
     * @desc Check that MEO sends an error when it receives a malformed request to modify
     *       the operational state of an application package
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_005_BR() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_patch(
                                                       PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")),
                                                       v_headers,
                                                       m_http_message_body_json(
                                                                                m_body_json_app_pkg_info_modification(
                                                                                                                      m_app_pkg_info_modification(
                                                                                                                                                  UNKNOWN
                            ))))));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_400_bad_request
                            )) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_BR
    
    /**
     * @desc Check that MEO responds with an error when it receives 
     *       a request for updating an App Package referred with a wrong ID
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_005_NF() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_post(
                                                       PICS_ROOT_API & PX_MEO_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")),
                                                       v_headers,
                                                       m_http_message_body_json(
                                                                                m_body_json_app_pkg_info_modification(
                                                                                                                       m_app_pkg_info_modification(
                                                                                                                                                   DISABLED
                            ))))));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_404_not_found
                            )) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_005_NF
    
    /**
     * @desc Check that MEO service returns an application package subscription when requested
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_006_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_post(
                                                       PICS_ROOT_API & PX_MEO_PKGM_SUBS,
                                                       v_headers,
                                                       m_http_message_body_json(
                                                                                m_body_json_pkgm_subscription(
                                                                                                              m_app_pkg_info_subscription(
                                                                                                                                          PX_CALLBACK_URI
                            ))))));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_201_created(
                                                                          mw_http_message_body_json(
                                                                                                    mw_body_json_pkgm_subscription_info(
                                                                                                                                        mw_app_pkg_subscription_info(
                                                                                                                                                                     -, 
                                                                                                                                                                     -, 
                                                                                                                                                                     PX_CALLBACK_URI
                            )))))) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_OK
    
    /**
     * @desc Check that MEO service sends an error when it receives a 
     *       malformed request for creating a new subscription on AppPackages
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_006_BR() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_post(
                                                       PICS_ROOT_API & PX_MEO_PKGM_SUBS,
                                                       v_headers,
                                                       m_http_message_body_json(
                                                                                m_body_json_pkgm_subscription(
                                                                                                              m_app_pkg_info_subscription(
                                                                                                                                          PX_CALLBACK_URI,
                                                                                                                                          "Invalid_field"
                            ))))));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_400_bad_request
                            )) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_006_BR
    
    /**
     * @desc Check that MEO service returns the list of Application Package Subscriptions when requested
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_get(
                                                      PICS_ROOT_API & PX_MEO_PKGM_SUBS,
                                                      v_headers
                    )));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_ok(
                                                                 mw_http_message_body_json(
                                                                                           mw_body_json_pkgm_subscription_link_list // TODO
                                             )))) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info list ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_007_OK
    
    /**
     * @desc Check that MEO service returns an Application Package Subscription when requested
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_008_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_get(
                                                      PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
                                                      v_headers
                    )));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_ok(
                                                                 mw_http_message_body_json(
                                                                                           mw_body_json_pkgm_subscription_info(
                                                                                                                               mw_app_pkg_subscription_info(
                                                                                                                                                            PX_APP_PKG_ID,
                                                                                                                                                            -,
                                                                                                                                                            PX_CALLBACK_URI,
                                                                                                                                                            m_app_pkg_link("") // TODO
                                             )))))) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_OK
    
    /**
     * @desc Check that MEO service returns an Application Package Subscription when requested
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_008_NF() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_get(
                                                      PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
                                                      v_headers
                    )));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_404_not_found
                            )) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_008_NF
    
    /**
     * @desc Check that MEO service deletes an Application Package Subscription when requested
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_009_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_delete(
                                                         PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")),
                                                         v_headers
                    )));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_204_no_content
                            )) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a sucbsrciption info ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_OK
    
    /**
     * @desc Check that MEO service sends an error when it receives a deletion request for a subscription on AppPackages 
     *       with a wrong identifier
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_009_NF() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_delete(
                                                         PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_SUBSCRIPTION_ID, "UTF-8")),
                                                         v_headers
                    )));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_404_not_found
                            )) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_009_NF
    
    /**
     * @desc Check that the MEO service sends a application package notification 
     *       if the MEO service has an associated subscription and the event is generated
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_request(
                                            mw_http_request_post(
                                                                 PICS_ROOT_API & PX_MEO_PKGM_SUBS & "/" & oct2char(unichar2oct(PX_SUBSCRIPTION_ID, "UTF-8")), // TODO To be changed
                                                                 v_headers,
                                                                 mw_http_message_body_json(
                                                                                           mw_body_json_app_package_notification(
                                                                                                                                 mw_app_pkg_notification // TODO To be refined
                            ))))) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully sends notification info ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_010_OK
    
    /**
     * @desc Check that MEO reads the content of the AppD of on-boarded individual application package resources when requested
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_011_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      // TODO Set accept filed to application/zip...
      httpPort.send(
                    m_http_request(
                                   m_http_request_get(
                                                      PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")) & "/appd",
                                                      v_headers
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_ok(
                                                                 ? // TODO To be refined
                            ))) -> value v_response {
          tc_ac.stop;

          // TODO Check HTTP message body
          log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_OK
    
    /**
     * @desc Check that MEO reads the content of the AppD of on-boarded individual application package resources when requested
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_011_NF() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      // TODO Set accept filed to application/zip...
      httpPort.send(
                    m_http_request(
                                   m_http_request_get(
                                                      PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/appd",
                                                      v_headers
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_404_not_found
                            )) -> value v_response {
          tc_ac.stop;

          // TODO Check HTTP message body
          log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_011_NF
    
    /**
     * @desc Check that MEO fetches the on-boarded application package content identified by appPkgId when requested
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      // TODO Set accept filed to application/zip...
      httpPort.send(
                    m_http_request(
                                   m_http_request_delete(
                                                         PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_APP_PKG_ID, "UTF-8")) & "/package_content",
                                                         v_headers
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_ok(
                                                                 ? // TODO To be refined
                            ))) -> value v_response {
          tc_ac.stop;

          // TODO Check HTTP message body
          log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_OK
    
    /**
     * @desc Check that MEO fetches the on-boarded application package content identified by appDId when requested
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      // TODO Set accept filed to application/zip...
      httpPort.send(
                    m_http_request(
                                   m_http_request_delete(
                                                         PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/package_content",
                                                         v_headers
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_ok(
                                                                 ? // TODO To be refined
                            ))) -> value v_response {
          tc_ac.stop;

          // TODO Check HTTP message body
          log("*** " & testcasename() & ": PASS: IUT successfully responds with AppId content ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_OK
    
    /**
     * @desc Check that MEO fetches the on-boarded application package content identified by appPkgId when requested
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_NF() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      // TODO Set accept filed to application/zip...
      httpPort.send(
                    m_http_request(
                                   m_http_request_delete(
                                                         PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_APP_PKG_ID, "UTF-8")) & "/package_content",
                                                         v_headers
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_404_not_found
                            )) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_01_NG
    
    /**
     * @desc Check that MEO service sends an error when it receives a request refering a wrong on-boarded appPkgId
     */
    testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_NF() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      // TODO Set accept filed to application/zip...
      httpPort.send(
                    m_http_request(
                                   m_http_request_delete(
                                                         PICS_ROOT_API & PX_MEPM_PKGM_URI & "/" & oct2char(unichar2oct(PX_NON_EXISTENT_ON_BOARDED_APP_PKG_ID, "UTF-8")) & "/package_content",
                                                         v_headers
                    )));
      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_404_not_found
                            )) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with a correct error code ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEO_PKGM_012_02_NG
    
  } // End of group meo_pkgmgt
  
  group mepm_pkgmgt {
    
    /**
     * @desc Check that MEPM returns the list of App Packages when requested - Note 3
     */
    testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){
          log("*** " & testcasename() & ": PICS_APP_PACKAGE_MANAGEMENT required for executing the TC ***");
          setverdict(inconc);
          stop;
      }

      // Test component configuration
      f_cf_01_http_up();

      // Preamble
      f_init_default_headers_list(-, -, v_headers);
      httpPort.send(
                    m_http_request(
                                   m_http_request_get(
                                                       PICS_ROOT_API & PX_MEPM_PKGM_URI,
                                                       v_headers
                     )));

      f_selfOrClientSyncAndVerdict(c_prDone, e_success);

      // Test Body
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_ok(
                                                                 mw_http_message_body_json(
                                                                                           mw_body_json_app_pkg_info_list
                            )))) -> value v_response {
          tc_ac.stop;

          log("*** " & testcasename() & ": PASS: IUT successfully responds with an App Package list ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_success);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdict(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
      
    } // End of testcase TC_MEC_MEC010p2_MEPM_PKGM_001_01_OK
    
    /**
     * @desc Check that MEPM returns the list of App Packages when requested - Note 3
     */
    testcase TC_MEC_MEC010p2_MEPM_PKGM_001_02_OK() runs on HttpComponent system HttpTestAdapter {
      // Local variables
      var Headers v_headers;
      var HttpMessage v_response;

      // Test control
      if (not(PICS_APP_PACKAGE_MANAGEMENT)){