Feature: Automation Profile CLI _get_service coverage boost
  As a developer
  I want to cover the _get_service function in automation_profile CLI module
  So that DI-container delegation behavior is exercised

  Background:
    Given the automation profile CLI module is imported for r2 coverage

  Scenario: _get_service returns the service provided by the container
    Given a mock container returning an automation profile service instance
    When I call _get_service directly
    Then the returned object should be an AutomationProfileService instance
    And the returned service should be the same object provided by the container

  Scenario: _get_service calls the container provider exactly once
    Given a mock container returning an automation profile service instance
    When I call _get_service directly
    Then the container automation profile service provider should be called once

  Scenario: _get_service does not consult container database_url directly
    Given a mock container returning an automation profile service instance
    When I call _get_service directly
    Then the container database_url provider should not be called

  Scenario: _get_service returns a working DB-backed service supplied by container
    Given a mock container returning a working db-backed automation profile service
    When I call _get_service directly
    Then the returned service should be able to list profiles without error

  Scenario: _get_service resolves through real container/provider wiring
    Given a real DI container configured with a temporary sqlite database
    When I call _get_service directly without mocking container access
    Then the returned object should be an AutomationProfileService instance
    And the resolved service should include a database-backed automation profile repository
