def METHOD_NAME(self):
    repo = HousingProviderRepository(None)
    mock_session = MagicMock()
    mock_query = MagicMock()
    provider1 = ServiceProviderWithId(1, "taylor")
    provider2 = ServiceProviderWithId(2, "swift")
    expected_providers = [provider1, provider2]
    mock_session.query.return_value = mock_query
    mock_query.all.return_value = expected_providers
    repo._get_session = lambda: mock_session
    actual = repo.get_service_providers()
    assert expected_providers == actual
    mock_session.close.assert_called_once()