diff --git a/test/test_sfg.py b/test/test_sfg.py
index 2023ffcf0977d9c08033557906586aae40c009db..885b0be87360ea34db9c846b539dac8dedcaf8e6 100644
--- a/test/test_sfg.py
+++ b/test/test_sfg.py
@@ -268,7 +268,7 @@ class TestReplaceOperations:
         mad1 = MAD()
         _sfg = sfg.replace_operations(['add1', 'mul1'], mad1)
 
-        assert _sfg.find_by_id('mad1') is not None
+        assert 'mad1' in _sfg._components_by_id.keys()
         assert {add1, mul1} not in _sfg.operations
 
     def test_replace_neg_add_with_sub(self):
@@ -282,7 +282,7 @@ class TestReplaceOperations:
         sub1 = Subtraction()
         _sfg = sfg.replace_operations(['add1', 'neg1'], sub1)
 
-        assert _sfg.find_by_id('sub1') is not None
+        assert 'sub1' in _sfg._components_by_id.keys()
         assert {add1, neg1} not in _sfg.operations
 
     def test_different_input_output_count(self, operation_tree):