def METHOD_NAME(self):
    """Tests _retrieve gets all log sinks and parent resources."""
    mock_data_access = mock.MagicMock()
    mock_data_access.scanner_iter.side_effect = _mock_gcp_resource_iter
    mock_service_config = mock.MagicMock()
    mock_service_config.model_manager = mock.MagicMock()
    mock_service_config.model_manager.get.return_value = (
        mock.MagicMock(), mock_data_access)
    self.scanner.service_config = mock_service_config
    log_sink_data = self.scanner._retrieve()
    expected_parents = [
        'organization/234/',
        'organization/234/billing_account/ABCD-1234/',
        'organization/234/folder/56/',
        'organization/234/project/proj-1/',
        'organization/234/folder/56/project/proj-2/',
        'organization/234/project/proj-3/',
    ]
    expected_log_sinks = [
        ['org_sink_1', 'org_sink_2'],
        ['billing_sink'],
        ['folder_sink'],
        [],
        ['p2_sink_1', 'p2_sink_2'],
        ['p3_sink'],
    ]
    self.assertEqual(len(expected_log_sinks), len(log_sink_data))
    for i in range(len(expected_log_sinks)):
        actual_parent, actual_log_sink_configs = log_sink_data[i]
        self.assertEqual(expected_parents[i], actual_parent.full_name)
        actual_log_sinks = [sink.id for sink in actual_log_sink_configs]
        self.assertEqual(expected_log_sinks[i], actual_log_sinks)