diff --git a/configuration/tests/__init__.py b/configuration/tests/__init__.py
new file mode 100644
index 0000000..5c6cb64
--- /dev/null
+++ b/configuration/tests/__init__.py
@@ -0,0 +1,12 @@
+"""
+Copyright 2020 The Magma Authors.
+
+This source code is licensed under the BSD-style license found in the
+LICENSE file in the root directory of this source tree.
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
diff --git a/configuration/tests/mconfig_manager_impl_tests.py b/configuration/tests/mconfig_manager_impl_tests.py
new file mode 100644
index 0000000..4be0adc
--- /dev/null
+++ b/configuration/tests/mconfig_manager_impl_tests.py
@@ -0,0 +1,63 @@
+"""
+Copyright 2020 The Magma Authors.
+
+This source code is licensed under the BSD-style license found in the
+LICENSE file in the root directory of this source tree.
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+import unittest
+from unittest import mock
+
+from google.protobuf import any_pb2
+from google.protobuf.json_format import MessageToJson
+from configuration import mconfig_managers
+from configuration.exceptions import LoadConfigError
+from orc8r.protos.mconfig import mconfigs_pb2
+
+
+class MconfigManagerImplTest(unittest.TestCase):
+    @mock.patch('magma.configuration.service_configs.load_service_config')
+    def test_load_mconfig(self, get_service_config_value_mock):
+        # Fixture mconfig has 1 unrecognized service, 1 unregistered type
+        magmad_fixture = mconfigs_pb2.MagmaD(
+            checkin_interval=10,
+            checkin_timeout=5,
+            autoupgrade_enabled=True,
+            autoupgrade_poll_interval=300,
+            package_version='1.0.0-0',
+            images=[],
+            tier_id='default',
+            feature_flags={'flag1': False},
+        )
+        magmad_fixture_any = any_pb2.Any()
+        magmad_fixture_any.Pack(magmad_fixture)
+        magmad_fixture_serialized = MessageToJson(magmad_fixture_any)
+        fixture = '''
+        {
+            "configs_by_key": {
+                "magmad": %s,
+                "foo": {
+                    "@type": "type.googleapis.com/magma.mconfig.NotAType",
+                    "value": "test1"
+                },
+                "not_a_service": {
+                    "@type": "type.googleapis.com/magma.mconfig.MagmaD",
+                    "value": "test2"
+                }
+            }
+        }
+        ''' % magmad_fixture_serialized
+        get_service_config_value_mock.return_value = {
+            'magma_services': ['foo'],
+        }
+
+        with mock.patch('builtins.open', mock.mock_open(read_data=fixture)):
+            manager = mconfig_managers.MconfigManagerImpl()
+            with self.assertRaises(LoadConfigError):
+                manager.load_mconfig()
diff --git a/configuration/tests/mconfigs_tests.py b/configuration/tests/mconfigs_tests.py
new file mode 100644
index 0000000..be8ae0f
--- /dev/null
+++ b/configuration/tests/mconfigs_tests.py
@@ -0,0 +1,103 @@
+"""
+Copyright 2020 The Magma Authors.
+
+This source code is licensed under the BSD-style license found in the
+LICENSE file in the root directory of this source tree.
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+"""
+
+import unittest
+from unittest import mock
+
+from google.protobuf.any_pb2 import Any
+from configuration import mconfigs
+from orc8r.protos.mconfig import mconfigs_pb2
+
+
+class MconfigsTest(unittest.TestCase):
+
+    @mock.patch('magma.configuration.service_configs.load_service_config')
+    def test_filter_configs_by_key(self, load_service_config_mock):
+        # All services present, but 1 type not
+        configs_by_key = {
+            'magmad': {
+                '@type': 'type.googleapis.com/magma.mconfig.MagmaD',
+                'value': 'world'.encode(),
+            },
+            'directoryd': {
+                '@type': 'type.googleapis.com/magma.mconfig.DirectoryD',
+                'value': 'hello'.encode(),
+            },
+            'foo': {
+                '@type': 'type.googleapis.com/magma.mconfig.Foo',
+                'value': 'test'.encode(),
+            },
+        }
+
+        # Directoryd not present
+        load_service_config_mock.return_value = {
+            'magma_services': ['mme', 'foo'],
+        }
+        actual = mconfigs.filter_configs_by_key(configs_by_key)
+        expected = {
+            'magmad': configs_by_key['magmad'],
+            'foo': configs_by_key['foo'],
+        }
+        self.assertEqual(expected, actual)
+
+        # No services present
+        load_service_config_mock.return_value = {
+            'magma_services': [],
+        }
+        actual = mconfigs.filter_configs_by_key(configs_by_key)
+        expected = {'magmad': configs_by_key['magmad']}
+        self.assertEqual(expected, actual)
+
+        # Directoryd service present as a dynamic service
+        load_service_config_mock.return_value = {
+            'magma_services': [],
+            'registered_dynamic_services': ['directoryd'],
+        }
+        actual = mconfigs.filter_configs_by_key(configs_by_key)
+        expected = {
+            'magmad': configs_by_key['magmad'],
+            'directoryd': configs_by_key['directoryd'],
+        }
+        self.assertEqual(expected, actual)
+
+    def test_unpack_mconfig_any(self):
+        magmad_mconfig = mconfigs_pb2.MagmaD(
+            checkin_interval=10,
+            checkin_timeout=5,
+            autoupgrade_enabled=True,
+            autoupgrade_poll_interval=300,
+            package_version='1.0.0-0',
+            images=[],
+            tier_id='default',
+            feature_flags={'flag1': False},
+        )
+        magmad_any = Any(
+            type_url='type.googleapis.com/magma.mconfig.MagmaD',
+            value=magmad_mconfig.SerializeToString(),
+        )
+        actual = mconfigs.unpack_mconfig_any(magmad_any, mconfigs_pb2.MagmaD())
+        self.assertEqual(magmad_mconfig, actual)
+
+    def test_unpack_mconfig_directoryd(self):
+        directoryd_mconfig = mconfigs_pb2.DirectoryD(
+            log_level=5,
+        )
+        magmad_any = Any(
+            type_url='type.googleapis.com/magma.mconfig.DirectoryD',
+            value=directoryd_mconfig.SerializeToString(),
+        )
+
+        actual = mconfigs.unpack_mconfig_any(
+            magmad_any, mconfigs_pb2.DirectoryD(),
+        )
+        self.assertEqual(directoryd_mconfig, actual)
