`mock_get_conn` is duplicated. It can be a separate method