diff --git a/raytracing/rays.py b/raytracing/rays.py
index aaf1971..83ffaf1 100644
--- a/raytracing/rays.py
+++ b/raytracing/rays.py
@@ -288,9 +288,9 @@ class RandomRays(Rays):
 
     def __getitem__(self, item):
         if self.rays is None:
-            raise NotImplemented("You cannot access RandomRays")
+            raise NotImplementedError("You cannot access RandomRays")
         elif len(self.rays) < item:
-            raise NotImplemented("You cannot access RandomRays")
+            raise NotImplementedError("You cannot access RandomRays")
         else:
             return self.rays[item]
 
@@ -301,7 +301,7 @@ class RandomRays(Rays):
         return self.randomRay()
 
     def randomRay(self) -> Ray:
-        raise NotImplemented("You must implement randomRay() in your subclass")
+        raise NotImplementedError("You must implement randomRay() in your subclass")
 
 
 class RandomUniformRays(RandomRays):

RandomRays raises a constant, not an exception
In `RandomRays`, some methods have `raise NotImplemented("...")`, but `NotImplemented` is a constant used in some binary methods (see https://docs.python.org/3/library/constants.html). I suspect what we want is `raise NotImplementedError("...")`.
diff --git a/raytracing/tests/testsComponents.py b/raytracing/tests/testsComponents.py
new file mode 100644
index 0000000..a4aba5b
--- /dev/null
+++ b/raytracing/tests/testsComponents.py
@@ -0,0 +1,60 @@
+import unittest
+import envtest  # modifies path
+from raytracing import *
+
+inf = float("+inf")
+
+
+class Test4fSystem(unittest.TestCase):
+
+    def test4fSystem(self):
+        elements = [Space(10), Lens(10), Space(15), Lens(5), Space(5)]
+        mg = MatrixGroup(elements, label="4f system")
+        system = System4f(10, 5, label="4f system")
+        self.assertEqual(system.A, -0.5)
+        self.assertEqual(system.B, 0)
+        self.assertEqual(system.C, 0)
+        self.assertEqual(system.D, -2)
+        self.assertEqual(system.L, 30)
+        self.assertEqual(mg.backIndex, system.backIndex)
+        self.assertEqual(mg.frontIndex, system.frontIndex)
+        self.assertEqual(mg.backVertex, system.backVertex)
+        self.assertEqual(mg.frontVertex, system.frontVertex)
+        self.assertEqual(mg.label, system.label)
+        self.assertTrue(system.isImaging)
+
+    def test2fSystem(self):
+        elements = [Space(10), Lens(10), Space(10)]
+        mg = MatrixGroup(elements, label="2f system")
+        system = System2f(10, label="2f system")
+        self.assertEqual(system.A, 0)
+        self.assertEqual(system.B, 10)
+        self.assertEqual(system.C, -1 / 10)
+        self.assertEqual(system.D, 0)
+        self.assertEqual(system.L, 20)
+        self.assertEqual(mg.backIndex, system.backIndex)
+        self.assertEqual(mg.frontIndex, system.frontIndex)
+        self.assertEqual(mg.backVertex, system.backVertex)
+        self.assertEqual(mg.frontVertex, system.frontVertex)
+        self.assertEqual(mg.label, system.label)
+        self.assertFalse(system.isImaging)
+
+    def test4fIsTwo2f(self):
+        f1, f2 = 10, 12
+        system4f = System4f(f1=10, f2=12)
+        system2f_1 = System2f(f1)
+        system2f_2 = System2f(f2)
+        composed4fSystem = MatrixGroup(system2f_1.elements + system2f_2.elements)
+        self.assertEqual(composed4fSystem.A, system4f.A)
+        self.assertEqual(composed4fSystem.B, system4f.B)
+        self.assertEqual(composed4fSystem.C, system4f.C)
+        self.assertEqual(composed4fSystem.D, system4f.D)
+        self.assertEqual(composed4fSystem.L, system4f.L)
+        self.assertEqual(composed4fSystem.backIndex, system4f.backIndex)
+        self.assertEqual(composed4fSystem.frontIndex, system4f.frontIndex)
+        self.assertEqual(composed4fSystem.backVertex, system4f.backVertex)
+        self.assertEqual(composed4fSystem.frontVertex, system4f.frontVertex)
+
+
+if __name__ == '__main__':
+    unittest.main()
diff --git a/raytracing/tests/testsRaysSubclasses.py b/raytracing/tests/testsRaysSubclasses.py
new file mode 100644
index 0000000..0b3710d
--- /dev/null
+++ b/raytracing/tests/testsRaysSubclasses.py
@@ -0,0 +1,14 @@
+import unittest
+import envtest  # modifies path
+from raytracing import *
+
+inf = float("+inf")
+
+
+class TestRandomRays(unittest.TestCase):
+
+    def testRandomRay(self):
+        rays = RandomRays()  # We keep default value, we are not intersted in the construction of a specific object
+        with self.assertRaises(NotImplementedError):
+            # This works
+            rays.randomRay()

pip install -e .
parse_log_pytest
pytest
coverage pytest
3.9
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
contourpy==1.3.0
coverage==7.8.0
cycler==0.12.1
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
fonttools==4.56.0
importlib_resources==6.5.2
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
kiwisolver==1.4.7
matplotlib==3.9.4
numpy==2.0.2
packaging @ file:///croot/packaging_1734472117206/work
pillow==11.1.0
pluggy @ file:///croot/pluggy_1733169602837/work
pyparsing==3.2.3
pytest @ file:///croot/pytest_1738938843180/work
python-dateutil==2.9.0.post0
-e git+https://github.com/DCC-Lab/RayTracing.git@3a1d740763e8a3138f7c2c025f0dce707249acd9#egg=raytracing
six==1.17.0
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
zipp==3.21.0

name: RayTracing
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.2=py39h06a4308_0
  - pip=25.0=py39h06a4308_0
  - pluggy=1.5.0=py39h06a4308_0
  - pytest=8.3.4=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2025a=h04d1e81_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - contourpy==1.3.0
      - coverage==7.8.0
      - cycler==0.12.1
      - fonttools==4.56.0
      - importlib-resources==6.5.2
      - kiwisolver==1.4.7
      - matplotlib==3.9.4
      - numpy==2.0.2
      - pillow==11.1.0
      - pyparsing==3.2.3
      - python-dateutil==2.9.0.post0
      - six==1.17.0
      - zipp==3.21.0
prefix: /opt/conda/envs/RayTracing

raytracing/tests/testsRaysSubclasses.py::TestRandomRays::testRandomRay
raytracing/tests/testsComponents.py::Test4fSystem::test2fSystem raytracing/tests/testsComponents.py::Test4fSystem::test4fIsTwo2f raytracing/tests/testsComponents.py::Test4fSystem::test4fSystem
raytracing/rays.py
raytracing/rays.py