def test_add_component(self):
        """
        Test the add_component method.

        @raise AssertionError: If the test fails.
        """
        composite = Composite(self.component_class)
        composite.add_component(self.leaf_one)

        composite_two = Composite(self.component_class)
        composite_two.add_component(self.leaf_two)

        composite_three = Composite(self.component_class)
        composite_three.add_component(self.leaf_three)

        composite_two.add_component(composite_three)

        composite.add_component(composite_two)

        try:
            composite.add_component(composite_two)
            composite_two.add_component(composite_three)
        except:
            raise AssertionError()
        else:
            self.assertSetEqual({self.leaf_one, composite_two}, composite.components)
            self.assertSetEqual({self.leaf_two, composite_three}, composite_two.components)
            self.assertSetEqual({self.leaf_three}, composite_three.components)

        Test the add_component method.

        @raise AssertionError: If the test fails.
        
tests/structural_tests/test_composite.py