Unit tests for connect_circuits