Separate get_topology() method from the test case.