From e1120fa60f4d4a5fddc3cd1d2d8a493b4858595c Mon Sep 17 00:00:00 2001
From: Trishna Saeharaseelan <trishna.saeharaseelan@noc.ac.uk>
Date: Thu, 26 Jan 2023 00:37:55 +0800
Subject: [PATCH] test: schema and spec validation

---
 __init__.py                                   |   2 +-
 .../mission_plan_AH1.json                     |   8 +-
 .../mission_plan_ECOSUB.json                  |   8 +-
 .../mission_plan_HYDROSURV.json               |  26 +-
 .../planning_configuration.json               |   8 +-
 examples/ecosub_adapter/mission_plan.json     |   8 +-
 examples/ecosub_adapter/platform_status.json  |   4 +-
 .../gui_adapter/planning_configuration.json   |   8 +-
 formats/__init__.py                           |   2 +-
 formats/observation.py                        |   1 -
 formats/planning_configuration.py             |   1 -
 formats/platform_status.py                    |   4 +-
 generate_schema_config.py                     |  45 +-
 project/soar/swagger.json                     |  22 +-
 tests/__init__.py                             |   8 +
 tests/fixtures/__init__.py                    |   8 +
 tests/fixtures/schemas.py                     | 581 +++++++++++++++
 tests/fixtures/swagger.json                   | 680 ++++++++++++++++++
 .../acknowledgement.json                      |  16 +
 .../mission_plan_AH1.json                     |  54 ++
 .../mission_plan_ECOSUB.json                  |  54 ++
 .../mission_plan_HYDROSURV.json               |  30 +
 .../planning_configuration.json               | 161 +++++
 .../platform_status-from_usbl_example.json    |  21 +
 .../platform_status.json                      |  44 ++
 .../ecosub_adapter/mission_plan.json          |  54 ++
 .../mock_data/ecosub_adapter/observation.json |  28 +
 .../platform_status-from_usbl_example.json    |  21 +
 .../ecosub_adapter/platform_status.json       |  44 ++
 .../sample_decoded_ecosub_status.txt          |  23 +
 .../gui_adapter/planning_configuration.json   | 160 +++++
 .../hydrosurv_adapter/acknowledgement.json    |  16 +
 .../hydrosurv_adapter/mission_plan.json       |  30 +
 .../hydrosurv_adapter/platform_status.json    |  30 +
 tests/test.py                                 | 168 +++++
 35 files changed, 2288 insertions(+), 90 deletions(-)
 create mode 100644 tests/__init__.py
 create mode 100644 tests/fixtures/__init__.py
 create mode 100644 tests/fixtures/schemas.py
 create mode 100644 tests/fixtures/swagger.json
 create mode 100644 tests/mock_data/autonomy_engine_adapter/acknowledgement.json
 create mode 100644 tests/mock_data/autonomy_engine_adapter/mission_plan_AH1.json
 create mode 100644 tests/mock_data/autonomy_engine_adapter/mission_plan_ECOSUB.json
 create mode 100644 tests/mock_data/autonomy_engine_adapter/mission_plan_HYDROSURV.json
 create mode 100644 tests/mock_data/autonomy_engine_adapter/planning_configuration.json
 create mode 100644 tests/mock_data/autonomy_engine_adapter/platform_status-from_usbl_example.json
 create mode 100644 tests/mock_data/autonomy_engine_adapter/platform_status.json
 create mode 100644 tests/mock_data/ecosub_adapter/mission_plan.json
 create mode 100644 tests/mock_data/ecosub_adapter/observation.json
 create mode 100644 tests/mock_data/ecosub_adapter/platform_status-from_usbl_example.json
 create mode 100644 tests/mock_data/ecosub_adapter/platform_status.json
 create mode 100644 tests/mock_data/ecosub_adapter/sample_decoded_ecosub_status.txt
 create mode 100644 tests/mock_data/gui_adapter/planning_configuration.json
 create mode 100644 tests/mock_data/hydrosurv_adapter/acknowledgement.json
 create mode 100644 tests/mock_data/hydrosurv_adapter/mission_plan.json
 create mode 100644 tests/mock_data/hydrosurv_adapter/platform_status.json
 create mode 100644 tests/test.py

diff --git a/__init__.py b/__init__.py
index 1aa4a33..67a3015 100644
--- a/__init__.py
+++ b/__init__.py
@@ -6,8 +6,8 @@ from flask import Flask
 # import os
 
 __all__ = [
-    "docs",
     "formats",
+    "tests",
 ]
 app = Flask(__name__)
 api = Api(app)
diff --git a/examples/autonomy_engine_adapter/mission_plan_AH1.json b/examples/autonomy_engine_adapter/mission_plan_AH1.json
index f6289c4..6dfe1a1 100644
--- a/examples/autonomy_engine_adapter/mission_plan_AH1.json
+++ b/examples/autonomy_engine_adapter/mission_plan_AH1.json
@@ -11,14 +11,13 @@
   "payload":{
     "message_type": "mission_plan",
     "platform_ID": "5-ah1",
-    "autonomy_engine_mission_plan_ID": 1,
+    "autonomy_engine_plan_ID": 1,
     "plan": [
       {
         "action": "move",
         "flight_style": "go to waypoint",
         "latitude_waypoint": -3.237143188645706,
         "longitude_waypoint": 52.37072283932642,
-        "altitude": null,
         "depth": 0.0,
         "activate_payload": false,
         "send_environmental_data": false
@@ -29,7 +28,6 @@
         "latitude_waypoint": -3.237143188645706,
         "longitude_waypoint": 52.37072283932642,
         "altitude": 10,
-        "depth": null,
         "activate_payload": false,
         "send_environmental_data": false
       },
@@ -39,7 +37,6 @@
         "latitude_waypoint": -0.237143188645706,
         "longitude_waypoint": 60.00000000000000,
         "altitude": 10,
-        "depth": null,
         "activate_payload": true,
         "send_environmental_data": false
       },
@@ -48,8 +45,7 @@
         "flight_style": "go to surface",
         "latitude_waypoint": -0.237143188645706,
         "longitude_waypoint": 52.37072283932642,
-        "altitude": null,
-        "depth": 0,
+        "depth": 0.0,
         "activate_payload": false,
         "send_environmental_data": true
       }
diff --git a/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json b/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json
index 92ff09c..f9a136d 100644
--- a/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json
+++ b/examples/autonomy_engine_adapter/mission_plan_ECOSUB.json
@@ -11,14 +11,13 @@
   "payload":{
     "message_type": "mission_plan",
     "platform_ID": "ecosub-5",
-    "autonomy_engine_mission_plan_ID": 1,
+    "autonomy_engine_plan_ID": 1,
     "plan": [
       {
         "action": "move",
         "flight_style": "go to waypoint",
         "latitude_waypoint": -3.237143188645706,
         "longitude_waypoint": 52.37072283932642,
-        "altitude": null,
         "depth": 0.0,
         "activate_payload": false,
         "send_environmental_data": false
@@ -29,7 +28,6 @@
         "latitude_waypoint": -3.237143188645706,
         "longitude_waypoint": 52.37072283932642,
         "altitude": 10,
-        "depth": null,
         "activate_payload": false,
         "send_environmental_data": false
       },
@@ -39,7 +37,6 @@
         "latitude_waypoint": -0.237143188645706,
         "longitude_waypoint": 60.00000000000000,
         "altitude": 10,
-        "depth": null,
         "activate_payload": true,
         "send_environmental_data": false
       },
@@ -48,8 +45,7 @@
         "flight_style": "go to surface",
         "latitude_waypoint": -0.237143188645706,
         "longitude_waypoint": 52.37072283932642,
-        "altitude": null,
-        "depth": 0,
+        "depth": 0.0,
         "activate_payload": false,
         "send_environmental_data": true
       }
diff --git a/examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json b/examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json
index 6cc34fd..f5c1c0d 100644
--- a/examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json
+++ b/examples/autonomy_engine_adapter/mission_plan_HYDROSURV.json
@@ -1,15 +1,18 @@
 {
-  "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
-  "timestamp": "2022-11-16T00:00:00Z",
-  "version": 2,
-  "source": "autonomy_engine",
-  "destination": "hydrosurv_adapter",
-  "delivery_type": "publish",
-  "encoded": false,
-  "message_type": "mission_plan",
-  "platform_ID": "reav-60-1",
-  "autonomy_engine_plan_ID": 1,
-  "plan": [
+  "header":{
+    "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+    "timestamp": "2022-11-16T00:00:00Z",
+    "version": 2,
+    "source": "autonomy_engine",
+    "destination": "hydrosurv_adapter",
+    "delivery_type": "publish",
+    "encoded": false
+  },
+  "payload":{
+    "message_type": "mission_plan",
+    "platform_ID": "reav-60-1",
+    "autonomy_engine_plan_ID": 1,
+    "plan": [
       {
         "latitude_waypoint": -4.187143188645706,
         "longitude_waypoint": 50.37072283932642
@@ -23,4 +26,5 @@
         "longitude_waypoint": 52.37072283932642
       }
     ]
+  }
 }
\ No newline at end of file
diff --git a/examples/autonomy_engine_adapter/planning_configuration.json b/examples/autonomy_engine_adapter/planning_configuration.json
index 06078de..f119183 100644
--- a/examples/autonomy_engine_adapter/planning_configuration.json
+++ b/examples/autonomy_engine_adapter/planning_configuration.json
@@ -40,7 +40,7 @@
         "squad_ID": 1,
         "no_of_platforms": 1,
         "squad_mission_type": "tracking",
-        "squad_state": false,
+        "squad_state": "active",
         "platforms": [
           {
             "model": "reav",
@@ -86,7 +86,7 @@
         "squad_ID": 2,
         "no_of_platforms": 3,
         "squad_mission_type": "survey",
-        "squad_state": true,
+        "squad_state": "active",
         "platforms": [
           {
             "platform_ID": "ecosub-1",
@@ -133,7 +133,7 @@
         "squad_ID": 3,
         "no_of_platforms": 1,
         "squad_mission_type": "inspection",
-        "squad_state": false,
+        "squad_state": "active",
         "platforms": [
           {
             "platform_ID": "ah-1",
@@ -143,7 +143,7 @@
               "additional_data": {},
               "latitude_waypoint": 20.432,
               "longitude_waypoint": 50.365,
-              "safe_command": "safety_abort",
+              "safe_command": "abort_now",
               "target_depth": 0.0
             },
             "max_velocity": 0.9,
diff --git a/examples/ecosub_adapter/mission_plan.json b/examples/ecosub_adapter/mission_plan.json
index 0a0dfdb..83e836a 100644
--- a/examples/ecosub_adapter/mission_plan.json
+++ b/examples/ecosub_adapter/mission_plan.json
@@ -11,14 +11,13 @@
   "payload":{
     "message_type": "mission_plan",
     "platform_ID": "ecosub-2",
-    "autonomy_engine_mission_plan_ID": 1,
+    "autonomy_engine_plan_ID": 1,
     "plan": [
       {
         "action": "move",
         "flight_style": "go to waypoint",
         "latitude_waypoint": -3.237143188645706,
         "longitude_waypoint": 52.37072283932642,
-        "altitude": null,
         "depth": 0.0,
         "activate_payload": false,
         "send_environmental_data": false
@@ -29,7 +28,6 @@
         "latitude_waypoint": -3.237143188645706,
         "longitude_waypoint": 52.37072283932642,
         "altitude": 10,
-        "depth": null,
         "activate_payload": false,
         "send_environmental_data": false
       },
@@ -39,7 +37,6 @@
         "latitude_waypoint": -0.237143188645706,
         "longitude_waypoint": 60.00000000000000,
         "altitude": 10,
-        "depth": null,
         "activate_payload": true,
         "send_environmental_data": false
       },
@@ -48,8 +45,7 @@
         "flight_style": "go to surface",
         "latitude_waypoint": -0.237143188645706,
         "longitude_waypoint": 52.37072283932642,
-        "altitude": null,
-        "depth": 0,
+        "depth": 0.0,
         "activate_payload": false,
         "send_environmental_data": true
       }
diff --git a/examples/ecosub_adapter/platform_status.json b/examples/ecosub_adapter/platform_status.json
index 7820d55..b82beba 100644
--- a/examples/ecosub_adapter/platform_status.json
+++ b/examples/ecosub_adapter/platform_status.json
@@ -25,8 +25,8 @@
         "altitude": 20,
         "heading": 90.0,
         "health_status": "Warning",
-        "localisation_error": null,
-        "usbl_fix_seconds_ago": null,
+        "localisation_error": 0,
+        "usbl_fix_seconds_ago": 0,
         "range_to_go": 124.3,
         "sensor_config": {
             "sensor_ID": 22,
diff --git a/examples/gui_adapter/planning_configuration.json b/examples/gui_adapter/planning_configuration.json
index adff68c..0f72c8a 100644
--- a/examples/gui_adapter/planning_configuration.json
+++ b/examples/gui_adapter/planning_configuration.json
@@ -40,7 +40,7 @@
         "squad_ID": 1,
         "no_of_platforms": 1,
         "squad_mission_type": "tracking",
-        "squad_state": false,
+        "squad_state": "active",
         "platforms": [
           {
             "model": "reav",
@@ -86,7 +86,7 @@
         "squad_ID": 2,
         "no_of_platforms": 3,
         "squad_mission_type": "survey",
-        "squad_state": true,
+        "squad_state": "active",
         "platforms": [
           {
             "platform_ID": "ecosub-2",
@@ -133,7 +133,7 @@
         "squad_ID": 3,
         "no_of_platforms": 1,
         "squad_mission_type": "inspection",
-        "squad_state": false,
+        "squad_state": "active",
         "platforms": [
           {
             "platform_ID": "139-ah-1",
@@ -143,7 +143,7 @@
               "additional_data": {},
               "latitude_waypoint": 20.432,
               "longitude_waypoint": 50.365,
-              "safe_command": "safety_abort",
+              "safe_command": "abort_now",
               "target_depth": 0.0
             },
             "max_velocity": 0.9,
diff --git a/formats/__init__.py b/formats/__init__.py
index 1af1410..e7e9b00 100644
--- a/formats/__init__.py
+++ b/formats/__init__.py
@@ -55,4 +55,4 @@ message_header = {
             "default": "publish",
         },
     },
-}
\ No newline at end of file
+}
diff --git a/formats/observation.py b/formats/observation.py
index 1da57a8..fdf3bb7 100644
--- a/formats/observation.py
+++ b/formats/observation.py
@@ -49,7 +49,6 @@ observation_schema = {
             + " platform if any found.",  # TODO: DEFINE FORMAT.
         },
         "region_surveyed": {
-            # "type": "null",
             "nullable": True,
             "description": "Region surveyed by given platform."
             + " GEOJSON",  # TODO: DEFINE FORMAT.
diff --git a/formats/planning_configuration.py b/formats/planning_configuration.py
index eb6f114..1138715 100644
--- a/formats/planning_configuration.py
+++ b/formats/planning_configuration.py
@@ -109,7 +109,6 @@ region_schema = {
         },
     },
     "description": "Using GEOJSON, exact 4-point region (rectangle shaped)",
-    "required": ["geometry_coordinates"],
 }
 
 squad_metadata_schema = {
diff --git a/formats/platform_status.py b/formats/platform_status.py
index 8e0ff33..4501570 100644
--- a/formats/platform_status.py
+++ b/formats/platform_status.py
@@ -24,7 +24,7 @@ sensor_schema = {
     },
 }
 
-platform_status_message_schema = {
+platform_status_schema = {
     "type": "object",
     "properties": {
         "message_type": {
@@ -59,7 +59,7 @@ platform_status_message_schema = {
             "example": "2022-12-21T00:00:00Z",
         },
         "platform_state": {
-            "type": "string", # TODO: Define enum with potential STATES of each platform
+            "type": "string",  # TODO: Define enum with potential STATES of each platform
             "description": "Current state executed by platform. E.g. "
             + "STOP, IDLE, ABORT.",
             "example": "ABORT",
diff --git a/generate_schema_config.py b/generate_schema_config.py
index b7c60a2..8cf02b6 100644
--- a/generate_schema_config.py
+++ b/generate_schema_config.py
@@ -2,7 +2,7 @@ from formats import message_header
 from formats.mission_plan import mission_plan_schema
 from formats.observation import observation_schema
 from formats.planning_configuration import planning_configuration_schema
-from formats.platform_status import platform_status_message_schema
+from formats.platform_status import platform_status_schema
 from formats.acknowledgement import acknowledgement_schema
 
 from flasgger import Swagger
@@ -15,10 +15,10 @@ swagger_config = {
     "openapi": "3.0.2",
     "swagger_ui": True,
     "specs_route": "/",
-        "info": {
+    "info": {
         "title": "SoAR Backbone Message Formats",
         "version": "1.0",
-        "description": "SoAR message protocol in schemas"
+        "description": "SoAR message protocol in schemas",
     },
     "specs": [
         {
@@ -36,16 +36,14 @@ swagger_config = {
                     "header": {
                         "$ref": "#/components/schemas/header",
                     },
-                    "payload": {
-                        "$ref": "#/components/schemas/payload"
-                    },
+                    "payload": {"$ref": "#/components/schemas/payload"},
                 },
                 "required": ["header", "payload"],
             },
             "payload": {
                 "discriminator": {
                     "propertyName": "message_type",
-                    "mapping":{
+                    "mapping": {
                         "mission_plan": "#/components/schemas/mission_plan",
                         "observation": "#/components/schemas/observation",
                         "planning_configuration": "#/components/schemas/planning_configuration",
@@ -53,34 +51,19 @@ swagger_config = {
                         "acknowledgement": "#/components/schemas/acknowledgement",
                     },
                 },
-                "oneOf":[
-                    {
-                        "$ref": "#/components/schemas/"
-                        + "acknowledgement"
-                    },
-                    {
-                        "$ref": "#/components/schemas/"
-                        + "mission_plan"
-                    },
-                    {
-                        "$ref": "#/components/schemas/"
-                        + "observation"
-                    },
-                    {
-                        "$ref": "#/components/schemas/"
-                        + "planning_configuration"
-                    },
-                    {
-                        "$ref": "#/components/schemas/"
-                        + "platform_status"
-                    },
-                ]
+                "oneOf": [
+                    {"$ref": "#/components/schemas/" + "acknowledgement"},
+                    {"$ref": "#/components/schemas/" + "mission_plan"},
+                    {"$ref": "#/components/schemas/" + "observation"},
+                    {"$ref": "#/components/schemas/" + "planning_configuration"},
+                    {"$ref": "#/components/schemas/" + "platform_status"},
+                ],
             },
             "header": message_header,
             "mission_plan": mission_plan_schema,
             "observation": observation_schema,
             "planning_configuration": planning_configuration_schema,
-            "platform_status": platform_status_message_schema,
+            "platform_status": platform_status_schema,
             "acknowledgement": acknowledgement_schema,
         }
     },
@@ -90,4 +73,4 @@ swag = Swagger(app, config=swagger_config, merge=True)
 
 
 if __name__ == "__main__":
-    app.run(debug=True)
\ No newline at end of file
+    app.run(debug=True)
diff --git a/project/soar/swagger.json b/project/soar/swagger.json
index 4f7d6a6..b60d60b 100644
--- a/project/soar/swagger.json
+++ b/project/soar/swagger.json
@@ -1,11 +1,4 @@
 {
-  "openapi": "3.0.2",
-  "info": {
-    "description": "SoAR message protocol in schemas",
-    "title": "SoAR Backbone Message Formats",
-    "version": "1.0"
-  },
-  "paths": {},
   "components": {
     "schemas": {
       "MESSAGE": {
@@ -307,9 +300,6 @@
                   "type": "array"
                 }
               },
-              "required": [
-                "geometry_coordinates"
-              ],
               "type": "object"
             },
             "type": "array"
@@ -458,9 +448,6 @@
                       "type": "array"
                     }
                   },
-                  "required": [
-                    "geometry_coordinates"
-                  ],
                   "type": "object"
                 },
                 "squad_ID": {
@@ -683,5 +670,12 @@
         "type": "object"
       }
     }
-  }
+  },
+  "info": {
+    "description": "SoAR message protocol in schemas",
+    "title": "SoAR Backbone Message Formats",
+    "version": "1.0"
+  },
+  "openapi": "3.0.2",
+  "paths": {}
 }
\ No newline at end of file
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000..2253a07
--- /dev/null
+++ b/tests/__init__.py
@@ -0,0 +1,8 @@
+import os
+
+
+__all__ = [
+    os.path.splitext(os.path.basename(x))[0]
+    for x in os.listdir(os.path.dirname(__file__))
+    if x.endswith(".py") and x != "__init__.py"
+]
diff --git a/tests/fixtures/__init__.py b/tests/fixtures/__init__.py
new file mode 100644
index 0000000..2253a07
--- /dev/null
+++ b/tests/fixtures/__init__.py
@@ -0,0 +1,8 @@
+import os
+
+
+__all__ = [
+    os.path.splitext(os.path.basename(x))[0]
+    for x in os.listdir(os.path.dirname(__file__))
+    if x.endswith(".py") and x != "__init__.py"
+]
diff --git a/tests/fixtures/schemas.py b/tests/fixtures/schemas.py
new file mode 100644
index 0000000..2d4ff05
--- /dev/null
+++ b/tests/fixtures/schemas.py
@@ -0,0 +1,581 @@
+message_header = {
+    "type": "object",
+    "discriminator": {
+        "propertyName": "message_type",
+    },
+    "properties": {
+        "message_ID": {
+            "type": "string",
+            "description": "An identifier for the type of message received.",
+            "example": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+        },
+        "timestamp": {
+            "type": "string",
+            "format": "date-time",
+            "description": "Timestamp of message",
+            "example": "2022-11-16T00:00:00Z",
+        },
+        "version": {
+            "type": "number",
+            "format": "float",
+            "description": "Version of comms backbone message format protocol",
+            "example": 2.0,
+        },
+        "source": {
+            "type": "string",
+            "description": "The sender; Where is this message from",
+            "example": "autonomy_engine",
+        },
+        "destination": {
+            "type": "string",
+            "description": "Publisher topic; What is the destination"
+            + " of this message",
+            "example": "ah1",
+        },
+        "encoded": {
+            "type": "boolean",
+            "description": "Indicate that message raw (encoded) or decoded. "
+            + "Options: encoded=True, decoded=False",
+            "example": False,
+        },
+        "delivery_type": {
+            "type": "string",
+            "description": "To publish or broadcast this message.",
+            "enum": ["broadcast", "publish"],
+            "example": "publish",
+            "default": "publish",
+        },
+    },
+}
+
+acknowledgement_schema = {
+    "type": "object",
+    "properties": {
+        "message_type": {
+            "type": "string",
+            "description": "Type of message",
+            "example": "acknowledgement",
+        },
+        "acknowledged_message_ID": {
+            "type": "string",
+            "description": "Identifier of message received and executed with "
+            + "success for mission plans sent by the Autonomy Engine.",
+            "example": "02125022255-7bc8-11ed-a1eb-0242ac999999",
+        },
+        "status": {
+            "type": "string",
+            "enum": ["c2_received", "operator_approved_and_sent", "executed"],
+            "description": "Highest level of acknowledgement. I.e."
+            + " `c2_received`: Received by C2, `operator_approved_and_sent`"
+            + " : Approved by operator and sent from C2->Platform,"
+            + " `executed`: Executed by platform",
+            "example": "executed by platform",
+        },
+    },
+    "required": ["message_type", "acknowledged_message_ID", "status"],
+}
+
+
+action_schema = {
+    "type": "object",
+    "properties": {
+        "action": {
+            "type": "string",
+            "description": "Autonomy Engine's action from `move`, `payload`,"
+            + " `dive`, `send_hits`, `scanline`, `scanpoint`.",
+            "example": "move",
+        },
+        "flight_style": {
+            "type": "string",
+            "description": "Platform-specific modes/flight styles to perform"
+            + " next action",
+            "example": "orbit",
+        },
+        "latitude_waypoint": {
+            "type": "number",
+            "format": "float",
+            "description": "Next waypoint, x-coordinate",
+            "example": -4.187143188645706,
+        },
+        "longitude_waypoint": {
+            "type": "number",
+            "format": "float",
+            "description": "Next waypoint, y-coordinate",
+            "example": 50.37072283932642,
+        },
+        "altitude": {
+            "type": "number",
+            "format": "float",
+            "description": "Altitude of next action",
+            "example": 15.0,
+        },
+        "depth": {
+            "type": "number",
+            "format": "float",
+            "description": "Depth of next action",
+            "example": 15.0,
+        },
+        "activate_payload": {
+            "type": "boolean",
+            "description": "To activate/deactivate sensor for Autosub "
+            + "Hover-1 --> `MBES` sensor and for EcoSUB --> `Sidescan`",
+            "example": True,
+        },
+        "send_environmental_data": {
+            "type": "boolean",
+            "description": "To trigger the platform to send list of"
+            + "  observations if any found",
+            "example": False,
+        },
+    },
+    "required": [
+        "latitude_waypoint",
+        "longitude_waypoint",
+    ],
+}
+
+mission_plan_schema = {
+    "type": "object",
+    "properties": {
+        "message_type": {
+            "type": "string",
+            "description": "Type of message",
+            "example": "mission_plan",
+        },
+        "autonomy_engine_plan_ID": {
+            "type": "integer",
+            "description": "Unique identifier for this plan"
+            + "generated by the Autonomy Engine",
+            "example": 3,
+        },
+        "platform_ID": {
+            "type": "string",
+            "description": "Unique identifier for this platform",
+            "example": "reav-x-1",
+        },
+        "plan": {
+            "type": "array",
+            "items": action_schema,
+        },
+    },
+    "required": ["message_type", "autonomy_engine_plan_ID", "platform_ID", "plan"],
+}
+
+
+hits_schema = {
+    "type": "object",
+    "properties": {
+        "latitude": {
+            "type": "number",
+            "format": "float",
+            "description": "Identified x-coordinate of point of interest",
+            "example": 178.2,
+        },
+        "longitude": {
+            "type": "number",
+            "format": "float",
+            "description": "Identified y-coordinate of point of interest",
+            "example": -10.122,
+        },
+        "quality_of_point": {
+            "type": "number",
+            "format": "float",
+            "description": "Quality/strength of points from features of"
+            + " interest identified by platform.",  # TODO: DEFINE FORMAT.
+            "example": 0.98,
+        },
+    },
+    "required": ["latitude", "longitude"],
+}
+
+observation_schema = {
+    "type": "object",
+    "properties": {
+        "message_type": {
+            "type": "string",
+            "description": "Type of message",
+            "example": "observation",
+        },
+        "platform_ID": {
+            "type": "string",
+            "description": "Unique identifier for this platform",
+            "example": "reav-x-1",
+        },
+        "points_of_interest": {
+            "type": "array",
+            "items": hits_schema,
+            "description": "Points from features of interest identified by"
+            + " platform if any found.",  # TODO: DEFINE FORMAT.
+        },
+        "region_surveyed": {
+            "nullable": True,
+            "description": "Region surveyed by given platform."
+            + " GEOJSON",  # TODO: DEFINE FORMAT.
+            "example": "",
+        },
+        "additional_data": {
+            "description": "Placeholder field for any additional data",
+            "example": {"sensor_payload": False},
+        },
+    },
+    "required": ["message_type", "platform_ID"],
+}
+
+emergency_schema = {
+    "type": "object",
+    "properties": {
+        "safe_command": {
+            "type": "string",
+            "enum": ["go_home", "abort_now", "stop_mission"],
+            "description": "Command/Action that is native to respective"
+            + " partner's platform/C2",
+            "example": "go_home",
+        },
+        "latitude_waypoint": {
+            "type": "number",
+            "format": "float",
+            "description": "X-coordinate safe place for respective platform",
+            "example": -7.432,
+        },
+        "longitude_waypoint": {
+            "type": "number",
+            "format": "float",
+            "description": "Y-coordinate safe place for respective platform",
+            "example": 50.365,
+        },
+        "target_depth": {
+            "type": "number",
+            "format": "float",
+            "description": "Z-coordinate safe place for respective platform"
+            + " . If platform to NOT stay at depth, key in `0.0`",
+            "example": 10,
+        },
+        "additional_data": {
+            "description": "Any addition fields/data to be added here",
+            "example": {},
+        },
+    },
+    "required": ["latitude_waypoint", "longitude_waypoint", "target_depth"],
+}
+
+
+platform_schema = {
+    "type": "object",
+    "properties": {
+        "platform_ID": {
+            "type": "string",
+            "description": "Unique identifier for this platform",
+            "example": "reav-x-1",
+        },
+        "serial": {
+            "type": "string",
+            "description": "platform serial number",
+            "example": "reav-60",
+        },
+        "model": {
+            "type": "string",
+            "example": "reav",
+        },
+        "emergency": emergency_schema,
+        "min_altitude": {
+            "type": "number",
+            "format": "float",
+            "description": "Minimum altitude set for squad.",
+            "example": 15.2,
+        },
+        "min_velocity": {
+            "type": "number",
+            "format": "float",
+            "description": "Minimum velocity set for squad.",
+            "example": 0.1,
+        },
+        "max_velocity": {
+            "type": "number",
+            "format": "float",
+            "description": "Maximum altitude set for squad.",
+            "example": 0.9,
+        },
+        "additional_specs": {
+            "description": "Any addition fields/data to be added here",
+            "example": {"swath_width": 10.0, "scan_type": "DVL"},
+        },
+    },
+    "required": [
+        "platform_ID",
+        "serial",
+        "model",
+        "emergency",
+        "min_altitude",
+        "min_velocity",
+        "max_velocity",
+    ],
+}
+
+region_schema = {
+    "type": "object",
+    "properties": {
+        "geometry_coordinates": {
+            "type": "array",  # TODO: Check if config defn is right.
+            "example": [
+                [
+                    [-4.187143188645706, 50.37072283932642],
+                    [-4.202697005964865, 50.368816892405874],
+                    [-4.203156724702808, 50.365640144076906],
+                    [-4.19449868846155, 50.362267670845654],
+                ]
+            ],
+        },
+    },
+    "description": "Using GEOJSON, exact 4-point region (rectangle shaped)",
+}
+
+squad_metadata_schema = {
+    "type": "object",
+    "properties": {
+        "squad_ID": {
+            "type": "integer",
+            "description": "Identifier of given squad",
+            "example": 23,
+        },
+        "no_of_platforms": {
+            "type": "integer",
+            "description": "Number of platforms",
+            "example": 3,
+        },
+        "platforms": {
+            "type": "array",
+            "items": platform_schema,
+            "description": "Squad consists of these platforms",
+        },
+        "squad_mission_type": {
+            "type": "string",
+            "enum": ["tracking", "survey", "inspection"],
+            "description": "Mission of given squad: `tracking`, `survey`"
+            + ", `inspection`",
+            "example": "survey",
+        },
+        "squad_state": {
+            "type": "string",
+            "description": "In execution, Waiting.. <define further>",
+            "example": False,
+        },
+        "region_of_interest": region_schema,
+    },
+    "required": [
+        "squad_ID",
+        "no_of_platforms",
+        "platforms",
+        "squad_mission_type",
+        "squad_state",
+    ],
+}
+
+planning_configuration_schema = {
+    "type": "object",
+    "properties": {
+        "message_type": {
+            "type": "string",
+            "description": "Type of message",
+            "example": "planning_configuration",
+        },
+        "planning_config_ID": {
+            "type": "integer",
+            "description": "Unique identifier tagged to version of this"
+            + " configuration plan",
+            "example": 3,
+        },
+        "exclusion_zones": {
+            "type": "array",
+            "items": region_schema,
+            "description": "Exclusion zones for all platforms",
+        },
+        "squads": {
+            "type": "array",
+            "items": squad_metadata_schema,
+        },
+    },
+    "required": [
+        "message_type",
+        "planning_config_ID",
+        "squads",
+        "exclusion_zones",
+    ],
+}
+
+
+sensor_schema = {
+    "type": "object",
+    "description": "Scanning sensor on platform available"
+    + " to be controlled by  the Autonomy Engine",
+    "properties": {
+        "sensor_serial": {
+            "type": "string",
+            "description": "serial number of sensor",
+            "example": "mbes-002a",
+        },
+        "sensor_on": {
+            "type": "boolean",
+            "description": "Sensor switched on (True) or off (False)",
+            "example": True,
+        },
+        "additional_data": {
+            "description": "Any addition fields/data to be added here",
+            "example": {"payload": [1.2, 434]},
+        },
+    },
+}
+
+platform_status_schema = {
+    "type": "object",
+    "properties": {
+        "message_type": {
+            "type": "string",
+            "description": "Type of message",
+            "example": "platform_status",
+        },
+        "platform_ID": {
+            "type": "string",
+            "description": "Unique identifier for this platform",
+            "example": "reav-x-1",
+        },
+        "status_source": {
+            "type": "string",
+            "enum": ["usbl", "onboard_platform"],
+            "description": "Indicate if this status message is from the"
+            + " platform or USBL",
+            "example": "usbl",
+        },
+        "transmission_mode": {
+            "type": "string",
+            "enum": ["acoustics", "iridium", "wifi", "starlink"],
+            "description": "Mode in which status message was transmitted"
+            + " when on the surface (e.g. iridium/wifi) or underwater"
+            + " (e.g. acoustics)",
+            "example": "wifi",
+        },
+        "platform_timestamp": {
+            "type": "string",
+            "format": "date-time",
+            "description": "Timestamp for onboard platform status message",
+            "example": "2022-12-21T00:00:00Z",
+        },
+        "platform_state": {
+            "type": "string",  # TODO: Define enum with potential STATES of each platform
+            "description": "Current state executed by platform. E.g. "
+            + "STOP, IDLE, ABORT.",
+            "example": "ABORT",
+        },
+        "autonomy_engine_plan_ID": {
+            "type": "integer",
+            "description": "Last mission plan ID (according to Autonomy"
+            + " Engine's mission plan number sent) executed by platform",
+            "example": 1,
+        },
+        "latitude": {
+            "type": "number",
+            "format": "float",
+            "description": "Latitude in decimal degrees.",
+            "example": 178.2,
+        },
+        "longitude": {
+            "type": "number",
+            "format": "float",
+            "description": "Longitude in decimal degrees.",
+            "example": -10.122,
+        },
+        "depth": {
+            "type": "number",
+            "format": "float",
+            "description": "Target depth in metres",
+            "example": 50,
+            "default": 0,
+        },
+        "altitude": {
+            "type": "number",
+            "format": "float",
+            "description": "Target altitude in metres",
+            "example": 20,
+        },
+        "mission_track_ID": {
+            "type": "integer",
+            "description": "Track number - stage in mission (e.g. "
+            + "4 --> Waypoint 3 to Waypoint 4)",
+            "example": 4,
+        },
+        "mission_action_ID": {
+            "type": "integer",
+            "description": "",  # TODO: Add description
+            "example": 1,
+        },
+        "range_to_go": {
+            "type": "number",
+            "format": "float",
+            "description": "Estimated distance to reach next waypoint",
+            "example": 124.3,
+        },
+        "speed_over_ground": {
+            "type": "number",
+            "format": "float",
+            "description": "",  # TODO: Add description
+            "example": 124.3,
+        },
+        "water_current_velocity": {
+            "type": "number",
+            "format": "float",
+            "description": "",  # TODO: Add description
+            "example": 124.3,
+        },
+        "thrust_applied": {
+            "type": "number",
+            "format": "float",
+            "description": "",  # TODO: Add description
+            "example": 124.3,
+        },
+        "heading": {
+            "type": "number",
+            "format": "float",
+            "description": "Angular distance relative to north, usually 000°"
+            + " at north, clockwise through 359°, in degrees",
+            "example": 124.3,
+        },
+        "health_status": {
+            "type": "string",
+            "description": "Health status extracted by respective platform "
+            + "if any diagnosis is available to check sensors",
+            "example": "Warning",
+        },
+        "localisation_error": {
+            "type": "number",
+            "format": "float",
+            "description": "Localisation error at last USBL update.",
+            "example": 0.000129,
+        },
+        "usbl_fix_seconds_ago": {
+            "type": "number",
+            "format": "float",
+            "description": "USBL Fix received x second ago.",
+            "example": 10.0,
+        },
+        "battery_remaining_capacity": {
+            "type": "number",
+            "format": "float",
+            "description": "Battery remaining % provided by respective C2",
+            "example": 80.2,
+        },
+        "current_pitch": {
+            "type": "number",
+            "format": "float",
+            "description": "Current pitch of platform",
+            "example": -4.0,
+        },
+        "sensor_config": sensor_schema,
+    },
+    "required": [
+        "message_type",
+        "platform_ID",
+        "status_source",
+        "platform_timestamp",
+        "latitude",
+        "longitude",
+    ],
+}
diff --git a/tests/fixtures/swagger.json b/tests/fixtures/swagger.json
new file mode 100644
index 0000000..31d4c95
--- /dev/null
+++ b/tests/fixtures/swagger.json
@@ -0,0 +1,680 @@
+{
+  "components": {
+    "schemas": {
+      "MESSAGE": {
+        "description": "Full message definition with message-metadata in `header` and different message type schemas under `payload`",
+        "properties": {
+          "header": {
+            "$ref": "#/components/schemas/header"
+          },
+          "payload": {
+            "$ref": "#/components/schemas/payload"
+          }
+        },
+        "required": [
+          "header",
+          "payload"
+        ],
+        "type": "object"
+      },
+      "acknowledgement": {
+        "properties": {
+          "acknowledged_message_ID": {
+            "description": "Identifier of message received and executed with success for mission plans sent by the Autonomy Engine.",
+            "example": "02125022255-7bc8-11ed-a1eb-0242ac999999",
+            "type": "string"
+          },
+          "message_type": {
+            "description": "Type of message",
+            "example": "acknowledgement",
+            "type": "string"
+          },
+          "status": {
+            "description": "Highest level of acknowledgement. I.e. `c2_received`: Received by C2, `operator_approved_and_sent` : Approved by operator and sent from C2->Platform, `executed`: Executed by platform",
+            "enum": [
+              "c2_received",
+              "operator_approved_and_sent",
+              "executed"
+            ],
+            "example": "executed by platform",
+            "type": "string"
+          }
+        },
+        "required": [
+          "message_type",
+          "acknowledged_message_ID",
+          "status"
+        ],
+        "type": "object"
+      },
+      "header": {
+        "discriminator": {
+          "propertyName": "message_type"
+        },
+        "properties": {
+          "delivery_type": {
+            "default": "publish",
+            "description": "To publish or broadcast this message.",
+            "enum": [
+              "broadcast",
+              "publish"
+            ],
+            "example": "publish",
+            "type": "string"
+          },
+          "destination": {
+            "description": "Publisher topic; What is the destination of this message",
+            "example": "ah1",
+            "type": "string"
+          },
+          "encoded": {
+            "description": "Indicate that message raw (encoded) or decoded. Options: encoded=True, decoded=False",
+            "example": false,
+            "type": "boolean"
+          },
+          "message_ID": {
+            "description": "An identifier for the type of message received.",
+            "example": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+            "type": "string"
+          },
+          "source": {
+            "description": "The sender; Where is this message from",
+            "example": "autonomy_engine",
+            "type": "string"
+          },
+          "timestamp": {
+            "description": "Timestamp of message",
+            "example": "2022-11-16T00:00:00Z",
+            "format": "date-time",
+            "type": "string"
+          },
+          "version": {
+            "description": "Version of comms backbone message format protocol",
+            "example": 2.0,
+            "format": "float",
+            "type": "number"
+          }
+        },
+        "type": "object"
+      },
+      "mission_plan": {
+        "properties": {
+          "autonomy_engine_plan_ID": {
+            "description": "Unique identifier for this plangenerated by the Autonomy Engine",
+            "example": 3,
+            "type": "integer"
+          },
+          "message_type": {
+            "description": "Type of message",
+            "example": "mission_plan",
+            "type": "string"
+          },
+          "plan": {
+            "items": {
+              "properties": {
+                "action": {
+                  "description": "Autonomy Engine's action from `move`, `payload`, `dive`, `send_hits`, `scanline`, `scanpoint`.",
+                  "example": "move",
+                  "type": "string"
+                },
+                "activate_payload": {
+                  "description": "To activate/deactivate sensor for Autosub Hover-1 --> `MBES` sensor and for EcoSUB --> `Sidescan`",
+                  "example": true,
+                  "type": "boolean"
+                },
+                "altitude": {
+                  "description": "Altitude of next action",
+                  "example": 15.0,
+                  "format": "float",
+                  "type": "number"
+                },
+                "depth": {
+                  "description": "Depth of next action",
+                  "example": 15.0,
+                  "format": "float",
+                  "type": "number"
+                },
+                "flight_style": {
+                  "description": "Platform-specific modes/flight styles to perform next action",
+                  "example": "orbit",
+                  "type": "string"
+                },
+                "latitude_waypoint": {
+                  "description": "Next waypoint, x-coordinate",
+                  "example": -4.187143188645706,
+                  "format": "float",
+                  "type": "number"
+                },
+                "longitude_waypoint": {
+                  "description": "Next waypoint, y-coordinate",
+                  "example": 50.37072283932642,
+                  "format": "float",
+                  "type": "number"
+                },
+                "send_environmental_data": {
+                  "description": "To trigger the platform to send list of  observations if any found",
+                  "example": false,
+                  "type": "boolean"
+                }
+              },
+              "required": [
+                "latitude_waypoint",
+                "longitude_waypoint"
+              ],
+              "type": "object"
+            },
+            "type": "array"
+          },
+          "platform_ID": {
+            "description": "Unique identifier for this platform",
+            "example": "reav-x-1",
+            "type": "string"
+          }
+        },
+        "required": [
+          "message_type",
+          "autonomy_engine_plan_ID",
+          "platform_ID",
+          "plan"
+        ],
+        "type": "object"
+      },
+      "observation": {
+        "properties": {
+          "additional_data": {
+            "description": "Placeholder field for any additional data",
+            "example": {
+              "sensor_payload": false
+            }
+          },
+          "message_type": {
+            "description": "Type of message",
+            "example": "observation",
+            "type": "string"
+          },
+          "platform_ID": {
+            "description": "Unique identifier for this platform",
+            "example": "reav-x-1",
+            "type": "string"
+          },
+          "points_of_interest": {
+            "description": "Points from features of interest identified by platform if any found.",
+            "items": {
+              "properties": {
+                "latitude": {
+                  "description": "Identified x-coordinate of point of interest",
+                  "example": 178.2,
+                  "format": "float",
+                  "type": "number"
+                },
+                "longitude": {
+                  "description": "Identified y-coordinate of point of interest",
+                  "example": -10.122,
+                  "format": "float",
+                  "type": "number"
+                },
+                "quality_of_point": {
+                  "description": "Quality/strength of points from features of interest identified by platform.",
+                  "example": 0.98,
+                  "format": "float",
+                  "type": "number"
+                }
+              },
+              "required": [
+                "latitude",
+                "longitude"
+              ],
+              "type": "object"
+            },
+            "type": "array"
+          },
+          "region_surveyed": {
+            "description": "Region surveyed by given platform. GEOJSON",
+            "example": ""
+          }
+        },
+        "required": [
+          "message_type",
+          "platform_ID"
+        ],
+        "type": "object"
+      },
+      "payload": {
+        "discriminator": {
+          "mapping": {
+            "acknowledgement": "#/components/schemas/acknowledgement",
+            "mission_plan": "#/components/schemas/mission_plan",
+            "observation": "#/components/schemas/observation",
+            "planning_configuration": "#/components/schemas/planning_configuration",
+            "platform_status": "#/components/schemas/platform_status"
+          },
+          "propertyName": "message_type"
+        },
+        "oneOf": [
+          {
+            "$ref": "#/components/schemas/acknowledgement"
+          },
+          {
+            "$ref": "#/components/schemas/mission_plan"
+          },
+          {
+            "$ref": "#/components/schemas/observation"
+          },
+          {
+            "$ref": "#/components/schemas/planning_configuration"
+          },
+          {
+            "$ref": "#/components/schemas/platform_status"
+          }
+        ]
+      },
+      "planning_configuration": {
+        "properties": {
+          "exclusion_zones": {
+            "description": "Exclusion zones for all platforms",
+            "items": {
+              "description": "Using GEOJSON, exact 4-point region (rectangle shaped)",
+              "properties": {
+                "geometry_coordinates": {
+                  "example": [
+                    [
+                      [
+                        -4.187143188645706,
+                        50.37072283932642
+                      ],
+                      [
+                        -4.202697005964865,
+                        50.368816892405874
+                      ],
+                      [
+                        -4.203156724702808,
+                        50.365640144076906
+                      ],
+                      [
+                        -4.19449868846155,
+                        50.362267670845654
+                      ]
+                    ]
+                  ],
+                  "type": "array"
+                }
+              },
+              "type": "object"
+            },
+            "type": "array"
+          },
+          "message_type": {
+            "description": "Type of message",
+            "example": "planning_configuration",
+            "type": "string"
+          },
+          "planning_config_ID": {
+            "description": "Unique identifier tagged to version of this configuration plan",
+            "example": 3,
+            "type": "integer"
+          },
+          "squads": {
+            "items": {
+              "properties": {
+                "no_of_platforms": {
+                  "description": "Number of platforms",
+                  "example": 3,
+                  "type": "integer"
+                },
+                "platforms": {
+                  "description": "Squad consists of these platforms",
+                  "items": {
+                    "properties": {
+                      "additional_specs": {
+                        "description": "Any addition fields/data to be added here",
+                        "example": {
+                          "scan_type": "DVL",
+                          "swath_width": 10.0
+                        }
+                      },
+                      "emergency": {
+                        "properties": {
+                          "additional_data": {
+                            "description": "Any addition fields/data to be added here",
+                            "example": {}
+                          },
+                          "latitude_waypoint": {
+                            "description": "X-coordinate safe place for respective platform",
+                            "example": -7.432,
+                            "format": "float",
+                            "type": "number"
+                          },
+                          "longitude_waypoint": {
+                            "description": "Y-coordinate safe place for respective platform",
+                            "example": 50.365,
+                            "format": "float",
+                            "type": "number"
+                          },
+                          "safe_command": {
+                            "description": "Command/Action that is native to respective partner's platform/C2",
+                            "enum": [
+                              "go_home",
+                              "abort_now",
+                              "stop_mission"
+                            ],
+                            "example": "go_home",
+                            "type": "string"
+                          },
+                          "target_depth": {
+                            "description": "Z-coordinate safe place for respective platform . If platform to NOT stay at depth, key in `0.0`",
+                            "example": 10,
+                            "format": "float",
+                            "type": "number"
+                          }
+                        },
+                        "required": [
+                          "latitude_waypoint",
+                          "longitude_waypoint",
+                          "target_depth"
+                        ],
+                        "type": "object"
+                      },
+                      "max_velocity": {
+                        "description": "Maximum altitude set for squad.",
+                        "example": 0.9,
+                        "format": "float",
+                        "type": "number"
+                      },
+                      "min_altitude": {
+                        "description": "Minimum altitude set for squad.",
+                        "example": 15.2,
+                        "format": "float",
+                        "type": "number"
+                      },
+                      "min_velocity": {
+                        "description": "Minimum velocity set for squad.",
+                        "example": 0.1,
+                        "format": "float",
+                        "type": "number"
+                      },
+                      "model": {
+                        "example": "reav",
+                        "type": "string"
+                      },
+                      "platform_ID": {
+                        "description": "Unique identifier for this platform",
+                        "example": "reav-x-1",
+                        "type": "string"
+                      },
+                      "serial": {
+                        "description": "platform serial number",
+                        "example": "reav-60",
+                        "type": "string"
+                      }
+                    },
+                    "required": [
+                      "platform_ID",
+                      "serial",
+                      "model",
+                      "emergency",
+                      "min_altitude",
+                      "min_velocity",
+                      "max_velocity"
+                    ],
+                    "type": "object"
+                  },
+                  "type": "array"
+                },
+                "region_of_interest": {
+                  "description": "Using GEOJSON, exact 4-point region (rectangle shaped)",
+                  "properties": {
+                    "geometry_coordinates": {
+                      "example": [
+                        [
+                          [
+                            -4.187143188645706,
+                            50.37072283932642
+                          ],
+                          [
+                            -4.202697005964865,
+                            50.368816892405874
+                          ],
+                          [
+                            -4.203156724702808,
+                            50.365640144076906
+                          ],
+                          [
+                            -4.19449868846155,
+                            50.362267670845654
+                          ]
+                        ]
+                      ],
+                      "type": "array"
+                    }
+                  },
+                  "type": "object"
+                },
+                "squad_ID": {
+                  "description": "Identifier of given squad",
+                  "example": 23,
+                  "type": "integer"
+                },
+                "squad_mission_type": {
+                  "description": "Mission of given squad: `tracking`, `survey`, `inspection`",
+                  "enum": [
+                    "tracking",
+                    "survey",
+                    "inspection"
+                  ],
+                  "example": "survey",
+                  "type": "string"
+                },
+                "squad_state": {
+                  "description": "In execution, Waiting.. <define further>",
+                  "example": false,
+                  "type": "string"
+                }
+              },
+              "required": [
+                "squad_ID",
+                "no_of_platforms",
+                "platforms",
+                "squad_mission_type",
+                "squad_state"
+              ],
+              "type": "object"
+            },
+            "type": "array"
+          }
+        },
+        "required": [
+          "message_type",
+          "planning_config_ID",
+          "squads",
+          "exclusion_zones"
+        ],
+        "type": "object"
+      },
+      "platform_status": {
+        "properties": {
+          "altitude": {
+            "description": "Target altitude in metres",
+            "example": 20,
+            "format": "float",
+            "type": "number"
+          },
+          "autonomy_engine_plan_ID": {
+            "description": "Last mission plan ID (according to Autonomy Engine's mission plan number sent) executed by platform",
+            "example": 1,
+            "type": "integer"
+          },
+          "battery_remaining_capacity": {
+            "description": "Battery remaining % provided by respective C2",
+            "example": 80.2,
+            "format": "float",
+            "type": "number"
+          },
+          "current_pitch": {
+            "description": "Current pitch of platform",
+            "example": -4.0,
+            "format": "float",
+            "type": "number"
+          },
+          "depth": {
+            "default": 0,
+            "description": "Target depth in metres",
+            "example": 50,
+            "format": "float",
+            "type": "number"
+          },
+          "heading": {
+            "description": "Angular distance relative to north, usually 000\u00b0 at north, clockwise through 359\u00b0, in degrees",
+            "example": 124.3,
+            "format": "float",
+            "type": "number"
+          },
+          "health_status": {
+            "description": "Health status extracted by respective platform if any diagnosis is available to check sensors",
+            "example": "Warning",
+            "type": "string"
+          },
+          "latitude": {
+            "description": "Latitude in decimal degrees.",
+            "example": 178.2,
+            "format": "float",
+            "type": "number"
+          },
+          "localisation_error": {
+            "description": "Localisation error at last USBL update.",
+            "example": 0.000129,
+            "format": "float",
+            "type": "number"
+          },
+          "longitude": {
+            "description": "Longitude in decimal degrees.",
+            "example": -10.122,
+            "format": "float",
+            "type": "number"
+          },
+          "message_type": {
+            "description": "Type of message",
+            "example": "platform_status",
+            "type": "string"
+          },
+          "mission_action_ID": {
+            "description": "",
+            "example": 1,
+            "type": "integer"
+          },
+          "mission_track_ID": {
+            "description": "Track number - stage in mission (e.g. 4 --> Waypoint 3 to Waypoint 4)",
+            "example": 4,
+            "type": "integer"
+          },
+          "platform_ID": {
+            "description": "Unique identifier for this platform",
+            "example": "reav-x-1",
+            "type": "string"
+          },
+          "platform_state": {
+            "description": "Current state executed by platform. E.g. STOP, IDLE, ABORT.",
+            "example": "ABORT",
+            "type": "string"
+          },
+          "platform_timestamp": {
+            "description": "Timestamp for onboard platform status message",
+            "example": "2022-12-21T00:00:00Z",
+            "format": "date-time",
+            "type": "string"
+          },
+          "range_to_go": {
+            "description": "Estimated distance to reach next waypoint",
+            "example": 124.3,
+            "format": "float",
+            "type": "number"
+          },
+          "sensor_config": {
+            "description": "Scanning sensor on platform available to be controlled by  the Autonomy Engine",
+            "properties": {
+              "additional_data": {
+                "description": "Any addition fields/data to be added here",
+                "example": {
+                  "payload": [
+                    1.2,
+                    434
+                  ]
+                }
+              },
+              "sensor_on": {
+                "description": "Sensor switched on (True) or off (False)",
+                "example": true,
+                "type": "boolean"
+              },
+              "sensor_serial": {
+                "description": "serial number of sensor",
+                "example": "mbes-002a",
+                "type": "string"
+              }
+            },
+            "type": "object"
+          },
+          "speed_over_ground": {
+            "description": "",
+            "example": 124.3,
+            "format": "float",
+            "type": "number"
+          },
+          "status_source": {
+            "description": "Indicate if this status message is from the platform or USBL",
+            "enum": [
+              "usbl",
+              "onboard_platform"
+            ],
+            "example": "usbl",
+            "type": "string"
+          },
+          "thrust_applied": {
+            "description": "",
+            "example": 124.3,
+            "format": "float",
+            "type": "number"
+          },
+          "transmission_mode": {
+            "description": "Mode in which status message was transmitted when on the surface (e.g. iridium/wifi) or underwater (e.g. acoustics)",
+            "enum": [
+              "acoustics",
+              "iridium",
+              "wifi",
+              "starlink"
+            ],
+            "example": "wifi",
+            "type": "string"
+          },
+          "usbl_fix_seconds_ago": {
+            "description": "USBL Fix received x second ago.",
+            "example": 10.0,
+            "format": "float",
+            "type": "number"
+          },
+          "water_current_velocity": {
+            "description": "",
+            "example": 124.3,
+            "format": "float",
+            "type": "number"
+          }
+        },
+        "required": [
+          "message_type",
+          "platform_ID",
+          "status_source",
+          "platform_timestamp",
+          "latitude",
+          "longitude"
+        ],
+        "type": "object"
+      }
+    }
+  },
+  "info": {
+    "description": "SoAR message protocol in schemas",
+    "title": "SoAR Backbone Message Formats",
+    "version": "1.0"
+  },
+  "openapi": "3.0.2",
+  "paths": {}
+}
\ No newline at end of file
diff --git a/tests/mock_data/autonomy_engine_adapter/acknowledgement.json b/tests/mock_data/autonomy_engine_adapter/acknowledgement.json
new file mode 100644
index 0000000..c5290f5
--- /dev/null
+++ b/tests/mock_data/autonomy_engine_adapter/acknowledgement.json
@@ -0,0 +1,16 @@
+{
+    "header":{
+        "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+        "timestamp": "2022-11-16T00:00:00Z",
+        "version": 1,
+        "source": "hydrosurv_adapter",
+        "destination": "autonomy_engine",
+        "delivery_type": "publish",
+        "encoded": false
+    },
+    "payload":{
+        "message_type": "acknowledgement",
+        "acknowledged_message_ID": "11111111-7bc8-11ed-a1eb-0242ac999999",
+        "status": "c2_received"
+    }
+}
\ No newline at end of file
diff --git a/tests/mock_data/autonomy_engine_adapter/mission_plan_AH1.json b/tests/mock_data/autonomy_engine_adapter/mission_plan_AH1.json
new file mode 100644
index 0000000..6dfe1a1
--- /dev/null
+++ b/tests/mock_data/autonomy_engine_adapter/mission_plan_AH1.json
@@ -0,0 +1,54 @@
+{
+  "header": {  
+    "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+    "timestamp": "2022-11-16T00:00:00Z",
+    "version": 2,
+    "source": "autonomy_engine",
+    "destination": "noc_c2",
+    "delivery_type": "publish",
+    "encoded": false
+  },
+  "payload":{
+    "message_type": "mission_plan",
+    "platform_ID": "5-ah1",
+    "autonomy_engine_plan_ID": 1,
+    "plan": [
+      {
+        "action": "move",
+        "flight_style": "go to waypoint",
+        "latitude_waypoint": -3.237143188645706,
+        "longitude_waypoint": 52.37072283932642,
+        "depth": 0.0,
+        "activate_payload": false,
+        "send_environmental_data": false
+      },
+      {
+        "action": "dive",
+        "flight_style": "dive to depth",
+        "latitude_waypoint": -3.237143188645706,
+        "longitude_waypoint": 52.37072283932642,
+        "altitude": 10,
+        "activate_payload": false,
+        "send_environmental_data": false
+      },
+      {
+        "action": "scanline",
+        "flight_style": "go to waypoint",
+        "latitude_waypoint": -0.237143188645706,
+        "longitude_waypoint": 60.00000000000000,
+        "altitude": 10,
+        "activate_payload": true,
+        "send_environmental_data": false
+      },
+      {
+        "action": "climb",
+        "flight_style": "go to surface",
+        "latitude_waypoint": -0.237143188645706,
+        "longitude_waypoint": 52.37072283932642,
+        "depth": 0.0,
+        "activate_payload": false,
+        "send_environmental_data": true
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/mock_data/autonomy_engine_adapter/mission_plan_ECOSUB.json b/tests/mock_data/autonomy_engine_adapter/mission_plan_ECOSUB.json
new file mode 100644
index 0000000..d7fd238
--- /dev/null
+++ b/tests/mock_data/autonomy_engine_adapter/mission_plan_ECOSUB.json
@@ -0,0 +1,54 @@
+{
+  "header": {  
+    "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+    "timestamp": "2022-11-16T00:00:00Z",
+    "version": 2,
+    "source": "autonomy_engine",
+    "destination": "ecosub_c2",
+    "delivery_type": "publish",
+    "encoded": false
+  },
+  "payload":{
+    "message_type": "mission_plan",
+    "platform_ID": "ecosub-5",
+    "autonomy_engine_plan_ID": 1,
+    "plan": [
+      {
+        "action": "move",
+        "flight_style": "go to waypoint",
+        "latitude_waypoint": -3.237143188645706,
+        "longitude_waypoint": 52.37072283932642,
+        "depth": 0.0,
+        "activate_payload": false,
+        "send_environmental_data": false
+      },
+      {
+        "action": "dive",
+        "flight_style": "dive to depth",
+        "latitude_waypoint": -3.237143188645706,
+        "longitude_waypoint": 52.37072283932642,
+        "altitude": 10,
+        "activate_payload": false,
+        "send_environmental_data": false
+      },
+      {
+        "action": "scanline",
+        "flight_style": "go to waypoint",
+        "latitude_waypoint": -0.237143188645706,
+        "longitude_waypoint": 60.00000000000000,
+        "altitude": 10,
+        "activate_payload": true,
+        "send_environmental_data": false
+      },
+      {
+        "action": "climb",
+        "flight_style": "go to surface",
+        "latitude_waypoint": -0.237143188645706,
+        "longitude_waypoint": 52.37072283932642,
+        "depth": 0,
+        "activate_payload": false,
+        "send_environmental_data": true
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/mock_data/autonomy_engine_adapter/mission_plan_HYDROSURV.json b/tests/mock_data/autonomy_engine_adapter/mission_plan_HYDROSURV.json
new file mode 100644
index 0000000..f5c1c0d
--- /dev/null
+++ b/tests/mock_data/autonomy_engine_adapter/mission_plan_HYDROSURV.json
@@ -0,0 +1,30 @@
+{
+  "header":{
+    "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+    "timestamp": "2022-11-16T00:00:00Z",
+    "version": 2,
+    "source": "autonomy_engine",
+    "destination": "hydrosurv_adapter",
+    "delivery_type": "publish",
+    "encoded": false
+  },
+  "payload":{
+    "message_type": "mission_plan",
+    "platform_ID": "reav-60-1",
+    "autonomy_engine_plan_ID": 1,
+    "plan": [
+      {
+        "latitude_waypoint": -4.187143188645706,
+        "longitude_waypoint": 50.37072283932642
+      },
+      {
+        "latitude_waypoint": -3.187143188645706,
+        "longitude_waypoint": 51.37072283932642
+      },
+      {
+        "latitude_waypoint": -3.237143188645706,
+        "longitude_waypoint": 52.37072283932642
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/mock_data/autonomy_engine_adapter/planning_configuration.json b/tests/mock_data/autonomy_engine_adapter/planning_configuration.json
new file mode 100644
index 0000000..f119183
--- /dev/null
+++ b/tests/mock_data/autonomy_engine_adapter/planning_configuration.json
@@ -0,0 +1,161 @@
+{
+  "header":{
+    "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+    "timestamp": "2022-11-16T00:00:00Z",
+    "version": 2,
+    "source": "ecosub_c2",
+    "destination": "autonomy_engine",
+    "delivery_type": "publish",
+    "encoded": false
+  },
+  "payload":{
+    "message_type": "platform_status",
+    "planning_config_ID": 3,
+    "exclusion_zones": [
+      {
+        "geometry_coordinates": [
+          [
+            [
+              -4.187143188645706,
+              50.37072283932642
+            ],
+            [
+              -4.202697005964865,
+              50.368816892405874
+            ],
+            [
+              -4.203156724702808,
+              50.365640144076906
+            ],
+            [
+              -4.19449868846155,
+              50.362267670845654
+            ]
+          ]
+        ]
+      }
+    ],
+    "squads": [
+      {
+        "squad_ID": 1,
+        "no_of_platforms": 1,
+        "squad_mission_type": "tracking",
+        "squad_state": "active",
+        "platforms": [
+          {
+            "model": "reav",
+            "platform_ID": "reav-60-1",
+            "serial": "reav-60",
+            "emergency": {
+              "additional_data": {},
+              "latitude_waypoint": -7.432,
+              "longitude_waypoint": 50.365,
+              "safe_command": "go_home",
+              "target_depth": 10
+            },
+            "max_velocity": 0.9,
+            "min_altitude": 15.2,
+            "min_velocity": 0.1,
+            "additional_data": {}
+          }
+        ],
+        "region_of_interest": {
+          "geometry_coordinates": [
+            [
+              [
+                -4.187143188645706,
+                50.37072283932642
+              ],
+              [
+                -4.202697005964865,
+                50.368816892405874
+              ],
+              [
+                -4.203156724702808,
+                50.365640144076906
+              ],
+              [
+                -4.19449868846155,
+                50.362267670845654
+              ]
+            ]
+          ]
+        }
+      },
+      {
+        "squad_ID": 2,
+        "no_of_platforms": 3,
+        "squad_mission_type": "survey",
+        "squad_state": "active",
+        "platforms": [
+          {
+            "platform_ID": "ecosub-1",
+            "serial": "ecosub-2",
+            "model": "ecosub",
+            "emergency": {
+              "additional_data": {},
+              "latitude_waypoint": -7.432,
+              "longitude_waypoint": 50.365,
+              "safe_command": "go_home",
+              "target_depth": 10.0
+            },
+            "max_velocity": 0.9,
+            "min_altitude": 15.2,
+            "min_velocity": 0.1,
+            "additional_data": {
+                "scan_type": "DVL",
+                "swath_width": 10
+            }
+          },
+          {
+            "platform_ID": "ecosub-2",
+            "serial": "ecosubxyz-5",
+            "model": "ecosub",
+            "emergency": {
+              "additional_data": {},
+              "latitude_waypoint": -0.432,
+              "longitude_waypoint": 20.365,
+              "safe_command": "go_home",
+              "target_depth": 0.0
+            },
+            "max_velocity": 0.9,
+            "min_altitude": 15.2,
+            "min_velocity": 0.1,
+            "additional_data": {
+                "scan_type": "DVL",
+                "swath_width": 10
+            }
+          }
+        ],
+        "region_of_interest": {}
+      },
+      {
+        "squad_ID": 3,
+        "no_of_platforms": 1,
+        "squad_mission_type": "inspection",
+        "squad_state": "active",
+        "platforms": [
+          {
+            "platform_ID": "ah-1",
+            "serial": "autosubhover-1",
+            "model": "autosub",
+            "emergency": {
+              "additional_data": {},
+              "latitude_waypoint": 20.432,
+              "longitude_waypoint": 50.365,
+              "safe_command": "abort_now",
+              "target_depth": 0.0
+            },
+            "max_velocity": 0.9,
+            "min_altitude": 15.2,
+            "min_velocity": 0.1,
+            "additional_data": {
+                "scan_type": "MBES"
+            }
+          }
+        ],
+        "region_of_interest": {}
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/mock_data/autonomy_engine_adapter/platform_status-from_usbl_example.json b/tests/mock_data/autonomy_engine_adapter/platform_status-from_usbl_example.json
new file mode 100644
index 0000000..6721a35
--- /dev/null
+++ b/tests/mock_data/autonomy_engine_adapter/platform_status-from_usbl_example.json
@@ -0,0 +1,21 @@
+{
+    "header":{
+        "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+        "timestamp": "2022-11-16T00:00:00Z",
+        "version": 2,
+        "source": "hermes",
+        "destination": "autonomy_engine",
+        "delivery_type": "publish",
+        "encoded": false
+    },
+    "payload":{
+        "message_type": "platform_status",
+        "platform_ID": "ecosub-5",
+        "platform_timestamp": "2022-12-21T00:00:00Z",
+        "status_source": "usbl",
+        "latitude": 178.2,
+        "longitude": -10.122,
+        "depth": 50,
+        "altitude": 20
+    }
+}
diff --git a/tests/mock_data/autonomy_engine_adapter/platform_status.json b/tests/mock_data/autonomy_engine_adapter/platform_status.json
new file mode 100644
index 0000000..b82beba
--- /dev/null
+++ b/tests/mock_data/autonomy_engine_adapter/platform_status.json
@@ -0,0 +1,44 @@
+{
+    "header":{
+        "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+        "timestamp": "2022-11-16T00:00:00Z",
+        "version": 2,
+        "source": "ecosub_c2",
+        "destination": "autonomy_engine",
+        "delivery_type": "publish",
+        "encoded": false
+    },
+    "payload":{
+        "message_type": "platform_status",
+        "platform_ID": "ecosub-2",
+        "platform_timestamp": "2022-12-21T00:00:00Z",
+        "status_source": "onboard_platform",
+        "autonomy_engine_plan_ID": 1,
+        "battery_remaining_capacity": 80.2,
+        "active": true,
+        "platform_state": "ABORT",
+        "mission_action_ID": 1,
+        "mission_track_ID": 4,
+        "latitude": 178.2,
+        "longitude": -10.122,
+        "depth": 50,
+        "altitude": 20,
+        "heading": 90.0,
+        "health_status": "Warning",
+        "localisation_error": 0,
+        "usbl_fix_seconds_ago": 0,
+        "range_to_go": 124.3,
+        "sensor_config": {
+            "sensor_ID": 22,
+            "serial": "sidescan-2x",    
+            "sensor_on": true,
+            "additional_data": {
+                "whiskers_on": true
+            }      
+        },
+        "current_pitch": -4,
+        "speed_over_ground": 4.3,
+        "thrust_applied": 124.3,
+        "water_current_velocity": 124.3
+    }
+}
diff --git a/tests/mock_data/ecosub_adapter/mission_plan.json b/tests/mock_data/ecosub_adapter/mission_plan.json
new file mode 100644
index 0000000..1b49981
--- /dev/null
+++ b/tests/mock_data/ecosub_adapter/mission_plan.json
@@ -0,0 +1,54 @@
+{
+  "header": {  
+    "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+    "timestamp": "2022-11-16T00:00:00Z",
+    "version": 2,
+    "source": "autonomy_engine",
+    "destination": "ecosub_c2",
+    "delivery_type": "publish",
+    "encoded": false
+  },
+  "payload":{
+    "message_type": "mission_plan",
+    "platform_ID": "ecosub-2",
+    "autonomy_engine_plan_ID": 1,
+    "plan": [
+      {
+        "action": "move",
+        "flight_style": "go to waypoint",
+        "latitude_waypoint": -3.237143188645706,
+        "longitude_waypoint": 52.37072283932642,
+        "depth": 0.0,
+        "activate_payload": false,
+        "send_environmental_data": false
+      },
+      {
+        "action": "dive",
+        "flight_style": "dive to depth",
+        "latitude_waypoint": -3.237143188645706,
+        "longitude_waypoint": 52.37072283932642,
+        "altitude": 10,
+        "activate_payload": false,
+        "send_environmental_data": false
+      },
+      {
+        "action": "scanline",
+        "flight_style": "go to waypoint",
+        "latitude_waypoint": -0.237143188645706,
+        "longitude_waypoint": 60.00000000000000,
+        "altitude": 10,
+        "activate_payload": true,
+        "send_environmental_data": false
+      },
+      {
+        "action": "climb",
+        "flight_style": "go to surface",
+        "latitude_waypoint": -0.237143188645706,
+        "longitude_waypoint": 52.37072283932642,
+        "depth": 0,
+        "activate_payload": false,
+        "send_environmental_data": true
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/mock_data/ecosub_adapter/observation.json b/tests/mock_data/ecosub_adapter/observation.json
new file mode 100644
index 0000000..8eb0571
--- /dev/null
+++ b/tests/mock_data/ecosub_adapter/observation.json
@@ -0,0 +1,28 @@
+{
+    "header":{
+        "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+        "timestamp": "2022-11-16T00:00:00Z",
+        "version": 2,
+        "source": "ecosub_c2",
+        "destination": "autonomy_engine",
+        "delivery_type": "publish",
+        "encoded": false
+    },
+    "payload":{
+        "message_type": "observation",
+        "platform_ID": "ecosub-2",
+        "points_of_interest": [
+            {
+                "latitude": 178.2,
+                "longitude": -10.122,
+                "quality_of_point": 0.98
+            },
+            {
+                "latitude": 50.1382,
+                "longitude": -11.122,
+                "quality_of_point": 0.50
+            }
+        ],
+        "region_surveyed": ""
+    }
+}
\ No newline at end of file
diff --git a/tests/mock_data/ecosub_adapter/platform_status-from_usbl_example.json b/tests/mock_data/ecosub_adapter/platform_status-from_usbl_example.json
new file mode 100644
index 0000000..6721a35
--- /dev/null
+++ b/tests/mock_data/ecosub_adapter/platform_status-from_usbl_example.json
@@ -0,0 +1,21 @@
+{
+    "header":{
+        "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+        "timestamp": "2022-11-16T00:00:00Z",
+        "version": 2,
+        "source": "hermes",
+        "destination": "autonomy_engine",
+        "delivery_type": "publish",
+        "encoded": false
+    },
+    "payload":{
+        "message_type": "platform_status",
+        "platform_ID": "ecosub-5",
+        "platform_timestamp": "2022-12-21T00:00:00Z",
+        "status_source": "usbl",
+        "latitude": 178.2,
+        "longitude": -10.122,
+        "depth": 50,
+        "altitude": 20
+    }
+}
diff --git a/tests/mock_data/ecosub_adapter/platform_status.json b/tests/mock_data/ecosub_adapter/platform_status.json
new file mode 100644
index 0000000..b82beba
--- /dev/null
+++ b/tests/mock_data/ecosub_adapter/platform_status.json
@@ -0,0 +1,44 @@
+{
+    "header":{
+        "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+        "timestamp": "2022-11-16T00:00:00Z",
+        "version": 2,
+        "source": "ecosub_c2",
+        "destination": "autonomy_engine",
+        "delivery_type": "publish",
+        "encoded": false
+    },
+    "payload":{
+        "message_type": "platform_status",
+        "platform_ID": "ecosub-2",
+        "platform_timestamp": "2022-12-21T00:00:00Z",
+        "status_source": "onboard_platform",
+        "autonomy_engine_plan_ID": 1,
+        "battery_remaining_capacity": 80.2,
+        "active": true,
+        "platform_state": "ABORT",
+        "mission_action_ID": 1,
+        "mission_track_ID": 4,
+        "latitude": 178.2,
+        "longitude": -10.122,
+        "depth": 50,
+        "altitude": 20,
+        "heading": 90.0,
+        "health_status": "Warning",
+        "localisation_error": 0,
+        "usbl_fix_seconds_ago": 0,
+        "range_to_go": 124.3,
+        "sensor_config": {
+            "sensor_ID": 22,
+            "serial": "sidescan-2x",    
+            "sensor_on": true,
+            "additional_data": {
+                "whiskers_on": true
+            }      
+        },
+        "current_pitch": -4,
+        "speed_over_ground": 4.3,
+        "thrust_applied": 124.3,
+        "water_current_velocity": 124.3
+    }
+}
diff --git a/tests/mock_data/ecosub_adapter/sample_decoded_ecosub_status.txt b/tests/mock_data/ecosub_adapter/sample_decoded_ecosub_status.txt
new file mode 100644
index 0000000..bacf888
--- /dev/null
+++ b/tests/mock_data/ecosub_adapter/sample_decoded_ecosub_status.txt
@@ -0,0 +1,23 @@
+#C2#
+4338
+(4338,)
+11111111111111111000000000000000
+Health : 722
+Content_Mask : 4
+Battery Voltage : 82045
+Battery Amps : 0
+Battery Acc charge : 767
+Battery Max Amps : 548
+Battery Max Voltage : 18
+Inner pressure : 43
+Inner Temp : 4
+Inner Humidity : 0
+Max depth : 0
+Current Pitch : -80
+Max pitch : 0
+Current RPM : 0
+Surface Time : 1636015764
+last GPS Time : 0
+(b'A', 0, 60, 1636016049, 57.33663558959961, -4.444321632385254, 0, 4294934528, 722, 4, 82045, 0, 767, 548, 18, 43, 4, 0, 0, -80, 0, 0, 1636015764, 0)
+['Type', 'Version', 'Sub_Num', 'Time', 'Latitude', 'Longitude', 'Health', 'Content_Mask', 'Battery Voltage', 'Battery Amps', 'Battery Acc charge', 'Battery Max Amps', 'Battery Max Voltage', 'Inner pressure', 'Inner Temp', 'Inner Humidity', 'Max depth', 'Current Pitch', 'Max pitch', 'Current RPM', 'Surface Time', 'last GPS Time']
+(b'A', 0, 60, 1636016049, 57.33663558959961, -4.444321632385254, 0, 4294934528, 722, 4, 82045, 0, 767, 548, 18, 43, 4, 0, 0, -80, 0, 0, 1636015764, 0)
\ No newline at end of file
diff --git a/tests/mock_data/gui_adapter/planning_configuration.json b/tests/mock_data/gui_adapter/planning_configuration.json
new file mode 100644
index 0000000..7ce3766
--- /dev/null
+++ b/tests/mock_data/gui_adapter/planning_configuration.json
@@ -0,0 +1,160 @@
+{
+  "header":{
+    "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+    "timestamp": "2022-11-16T00:00:00Z",
+    "version": 2,
+    "source": "ecosub_c2",
+    "destination": "autonomy_engine",
+    "delivery_type": "publish",
+    "encoded": false
+  },
+  "payload":{
+    "message_type": "platform_status",
+    "planning_config_ID": 3,
+    "exclusion_zones": [
+      {
+        "geometry_coordinates": [
+          [
+            [
+              -4.187143188645706,
+              50.37072283932642
+            ],
+            [
+              -4.202697005964865,
+              50.368816892405874
+            ],
+            [
+              -4.203156724702808,
+              50.365640144076906
+            ],
+            [
+              -4.19449868846155,
+              50.362267670845654
+            ]
+          ]
+        ]
+      }
+    ],
+    "squads": [
+      {
+        "squad_ID": 1,
+        "no_of_platforms": 1,
+        "squad_mission_type": "tracking",
+        "squad_state": "active",
+        "platforms": [
+          {
+            "model": "reav",
+            "platform_ID": "reav-60-1",
+            "serial": "reav-60",
+            "emergency": {
+              "additional_data": {},
+              "latitude_waypoint": -7.432,
+              "longitude_waypoint": 50.365,
+              "safe_command": "go_home",
+              "target_depth": 10
+            },
+            "max_velocity": 0.9,
+            "min_altitude": 15.2,
+            "min_velocity": 0.1,
+            "additional_data": {}
+          }
+        ],
+        "region_of_interest": {
+          "geometry_coordinates": [
+            [
+              [
+                -4.187143188645706,
+                50.37072283932642
+              ],
+              [
+                -4.202697005964865,
+                50.368816892405874
+              ],
+              [
+                -4.203156724702808,
+                50.365640144076906
+              ],
+              [
+                -4.19449868846155,
+                50.362267670845654
+              ]
+            ]
+          ]
+        }
+      },
+      {
+        "squad_ID": 2,
+        "no_of_platforms": 3,
+        "squad_mission_type": "survey",
+        "squad_state": "active",
+        "platforms": [
+          {
+            "platform_ID": "ecosub-2",
+            "serial": "ecosub-2",
+            "model": "ecosub",
+            "emergency": {
+              "additional_data": {},
+              "latitude_waypoint": -7.432,
+              "longitude_waypoint": 50.365,
+              "safe_command": "go_home",
+              "target_depth": 10.0
+            },
+            "max_velocity": 0.9,
+            "min_altitude": 15.2,
+            "min_velocity": 0.1,
+            "additional_data": {
+                "scan_type": "DVL",
+                "swath_width": 10
+            }
+          },
+          {
+            "platform_ID": "ecosub-5",
+            "serial": "ecosub-5",
+            "model": "ecosub",
+            "emergency": {
+              "additional_data": {},
+              "latitude_waypoint": -0.432,
+              "longitude_waypoint": 20.365,
+              "safe_command": "go_home",
+              "target_depth": 0.0
+            },
+            "max_velocity": 0.9,
+            "min_altitude": 15.2,
+            "min_velocity": 0.1,
+            "additional_data": {
+                "scan_type": "DVL",
+                "swath_width": 10
+            }
+          }
+        ]
+      },
+      {
+        "squad_ID": 3,
+        "no_of_platforms": 1,
+        "squad_mission_type": "inspection",
+        "squad_state": "active",
+        "platforms": [
+          {
+            "platform_ID": "139-ah-1",
+            "serial": "ah-1",
+            "model": "autosub",
+            "emergency": {
+              "additional_data": {},
+              "latitude_waypoint": 20.432,
+              "longitude_waypoint": 50.365,
+              "safe_command": "abort_now",
+              "target_depth": 0.0
+            },
+            "max_velocity": 0.9,
+            "min_altitude": 15.2,
+            "min_velocity": 0.1,
+            "additional_data": {
+                "scan_type": "MBES"
+            }
+          }
+        ],
+        "region_of_interest": {}
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/mock_data/hydrosurv_adapter/acknowledgement.json b/tests/mock_data/hydrosurv_adapter/acknowledgement.json
new file mode 100644
index 0000000..c5290f5
--- /dev/null
+++ b/tests/mock_data/hydrosurv_adapter/acknowledgement.json
@@ -0,0 +1,16 @@
+{
+    "header":{
+        "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+        "timestamp": "2022-11-16T00:00:00Z",
+        "version": 1,
+        "source": "hydrosurv_adapter",
+        "destination": "autonomy_engine",
+        "delivery_type": "publish",
+        "encoded": false
+    },
+    "payload":{
+        "message_type": "acknowledgement",
+        "acknowledged_message_ID": "11111111-7bc8-11ed-a1eb-0242ac999999",
+        "status": "c2_received"
+    }
+}
\ No newline at end of file
diff --git a/tests/mock_data/hydrosurv_adapter/mission_plan.json b/tests/mock_data/hydrosurv_adapter/mission_plan.json
new file mode 100644
index 0000000..f5c1c0d
--- /dev/null
+++ b/tests/mock_data/hydrosurv_adapter/mission_plan.json
@@ -0,0 +1,30 @@
+{
+  "header":{
+    "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+    "timestamp": "2022-11-16T00:00:00Z",
+    "version": 2,
+    "source": "autonomy_engine",
+    "destination": "hydrosurv_adapter",
+    "delivery_type": "publish",
+    "encoded": false
+  },
+  "payload":{
+    "message_type": "mission_plan",
+    "platform_ID": "reav-60-1",
+    "autonomy_engine_plan_ID": 1,
+    "plan": [
+      {
+        "latitude_waypoint": -4.187143188645706,
+        "longitude_waypoint": 50.37072283932642
+      },
+      {
+        "latitude_waypoint": -3.187143188645706,
+        "longitude_waypoint": 51.37072283932642
+      },
+      {
+        "latitude_waypoint": -3.237143188645706,
+        "longitude_waypoint": 52.37072283932642
+      }
+    ]
+  }
+}
\ No newline at end of file
diff --git a/tests/mock_data/hydrosurv_adapter/platform_status.json b/tests/mock_data/hydrosurv_adapter/platform_status.json
new file mode 100644
index 0000000..43bac1f
--- /dev/null
+++ b/tests/mock_data/hydrosurv_adapter/platform_status.json
@@ -0,0 +1,30 @@
+{
+  "header":{
+    "message_ID": "b427003c-0000-11aa-a1eb-bvcdfghjgfdd",
+    "timestamp": "2022-11-16T00:00:00Z",
+    "version": 2,
+    "source": "hydrosurv_adapter",
+    "destination": "autonomy_engine",
+    "delivery_type": "publish",
+    "encoded": false
+  },
+  "payload":{
+    "message_type": "platform_status",
+    "autonomy_engine_plan_ID": 1,
+    "active": true,
+    "status_source": "onboard_platform",
+    "battery_remaining_capacity": 80.2,
+    "heading": 310.0,
+    "health_status": "Lost Connection",
+    "latitude": 178.2,
+    "longitude": -10.122,
+    "mission_action_ID": 1,
+    "mission_track_ID": 4,
+    "platform_ID": "reav-60-1",
+    "platform_state": "ABORT",
+    "platform_timestamp": "2022-12-21T00:00:00Z",
+    "speed_over_ground": 4.5,
+    "range_to_go": 0.0,
+    "thrust_applied": 2.3
+  }
+}
\ No newline at end of file
diff --git a/tests/test.py b/tests/test.py
new file mode 100644
index 0000000..0018211
--- /dev/null
+++ b/tests/test.py
@@ -0,0 +1,168 @@
+from openapi_spec_validator import openapi_v30_spec_validator, openapi_v3_spec_validator
+from openapi_spec_validator.readers import read_from_filename
+from openapi_schema_validator import validate
+from jsonschema import FormatChecker
+from jsonschema import validate
+
+from fixtures.schemas import (
+    acknowledgement_schema,
+    message_header,
+    observation_schema,
+    planning_configuration_schema,
+    platform_status_schema,
+    mission_plan_schema,
+)
+import json
+"""
+Test specs
+"""
+schema, spec_url = read_from_filename("fixtures/swagger.json")
+errors_iterator = openapi_v3_spec_validator.iter_errors(schema)
+print(errors_iterator)
+print(openapi_v30_spec_validator.validate(schema))
+
+"""
+Test schema - Hydrosurv Messages
+"""
+message_types = ["acknowledgement", "mission_plan", "platform_status"]
+for item in message_types:
+    f = open("mock_data/hydrosurv_adapter/%s.json" % item)
+    mock_data = json.load(f)
+    header_data = mock_data["header"]
+    payload_data = mock_data["payload"]
+    print(validate(header_data, message_header, format_checker=FormatChecker()))
+    if item == "acknowledgement":
+        print(
+            validate(
+                payload_data, acknowledgement_schema, format_checker=FormatChecker()
+            )
+        )
+    elif item == "mission_plan":
+        print(
+            validate(payload_data, mission_plan_schema, format_checker=FormatChecker())
+        )
+    elif item == "platform_status":
+        print(
+            validate(
+                payload_data, platform_status_schema, format_checker=FormatChecker()
+            )
+        )
+
+
+"""
+Test schema - GUI Messages
+"""
+message_types = ["planning_configuration"]
+for item in message_types:
+    f = open("mock_data/gui_adapter/%s.json" % item)
+    mock_data = json.load(f)
+    header_data = mock_data["header"]
+    payload_data = mock_data["payload"]
+    print(validate(header_data, message_header, format_checker=FormatChecker()))
+    if item == "planning_configuration":
+        print(
+            validate(
+                payload_data,
+                planning_configuration_schema,
+                format_checker=FormatChecker(),
+            )
+        )
+
+
+"""
+Test schema - Ecosub Messages
+"""
+message_types = [
+    "observation",
+    "mission_plan",
+    "platform_status",
+    "platform_status-from_usbl_example",
+]
+for item in message_types:
+    f = open("mock_data/ecosub_adapter/%s.json" % item)
+    mock_data = json.load(f)
+    header_data = mock_data["header"]
+    payload_data = mock_data["payload"]
+    print(validate(header_data, message_header, format_checker=FormatChecker()))
+    if item == "platform_status-from_usbl_example.json":
+        print(
+            validate(
+                payload_data, platform_status_schema, format_checker=FormatChecker()
+            )
+        )
+    elif item == "mission_plan":
+        print(
+            validate(payload_data, mission_plan_schema, format_checker=FormatChecker())
+        )
+    elif item == "platform_status":
+        print(
+            validate(
+                payload_data, platform_status_schema, format_checker=FormatChecker()
+            )
+        )
+    elif item == "observation":
+        print(
+            validate(payload_data, observation_schema, format_checker=FormatChecker())
+        )
+
+
+"""
+Test schema - Autonomy Engine Messages
+"""
+message_types = [
+    "planning_configuration",
+    "mission_plan_AH1",
+    "mission_plan_ECOSUB",
+    "mission_plan_HYDROSURV",
+    "platform_status",
+    "platform_status-from_usbl_example",
+    "acknowledgement",
+]
+for item in message_types:
+    f = open("mock_data/autonomy_engine_adapter/%s.json" % item)
+    mock_data = json.load(f)
+    header_data = mock_data["header"]
+    payload_data = mock_data["payload"]
+    print(validate(header_data, message_header, format_checker=FormatChecker()))
+    if item == "platform_status-from_usbl_example.json":
+        print(
+            validate(
+                payload_data, platform_status_schema, format_checker=FormatChecker()
+            )
+        )
+    elif item == "mission_plan_AH1":
+        print(
+            validate(payload_data, mission_plan_schema, format_checker=FormatChecker())
+        )
+    elif item == "mission_plan_ECOSUB":
+        print(
+            validate(payload_data, mission_plan_schema, format_checker=FormatChecker())
+        )
+    elif item == "mission_plan_HYDROSURV":
+        print(
+            validate(payload_data, mission_plan_schema, format_checker=FormatChecker())
+        )
+    elif item == "platform_status":
+        print(
+            validate(
+                payload_data, platform_status_schema, format_checker=FormatChecker()
+            )
+        )
+    elif item == "observation":
+        print(
+            validate(payload_data, observation_schema, format_checker=FormatChecker())
+        )
+    elif item == "planning_configuration":
+        print(
+            validate(
+                payload_data,
+                planning_configuration_schema,
+                format_checker=FormatChecker(),
+            )
+        )
+    elif item == "acknowledgement":
+        print(
+            validate(
+                payload_data, acknowledgement_schema, format_checker=FormatChecker()
+            )
+        )
-- 
GitLab