From a0d7915914486f6d90cee9ba121954d89070702e Mon Sep 17 00:00:00 2001 From: Alice Lui <54395483+al01010@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:46:29 +0100 Subject: [PATCH] EPBR-5664: Update avg CO2 stubs to whole numbers As this will be more representative of the data returned from the warehouse and remove generation and presence of the text.html file --- .../service_performance_csv_spec.rb | 4 +- .../view_service_performance_spec.rb | 4 +- .../average_co2_emissions/stub.rb | 4 +- .../average_co2_emissions_stub.rb | 14 +- spec/unit/domain/shared_statistics.rb | 8 +- spec/unit/domain/statistics_results_spec.rb | 18 +- spec/unit/use_case/fetch_statistics_spec.rb | 2 +- test.html | 8762 ----------------- 8 files changed, 26 insertions(+), 8790 deletions(-) delete mode 100644 test.html diff --git a/spec/acceptance/service_performance_csv_spec.rb b/spec/acceptance/service_performance_csv_spec.rb index cd4c1526..a8642e0e 100644 --- a/spec/acceptance/service_performance_csv_spec.rb +++ b/spec/acceptance/service_performance_csv_spec.rb @@ -41,7 +41,6 @@ def response_csv_header(body) end it "return a response 200 response" do - save_response_to_file(file: "test", content: response.body) expect(response.status).to eq(200) end @@ -130,7 +129,7 @@ def response_csv_header(body) end it "has a csv with the correct body" do - expect(response.body).to match(/Sep-2021,23834,77.82,15.74,119033,61.74,10.88,7572,68.18,3298,402,861/) + expect(response.body).to match(/Sep-2021,23834,77.82,15,119033,61.74,10,7572,68.18,3298,402,861/) end it "produces a data set with correct number of rows" do @@ -153,7 +152,6 @@ def response_csv_header(body) end it "return a response 200 response" do - File.write("test.html", response.body) expect(response.status).to eq(200) end diff --git a/spec/acceptance/view_service_performance_spec.rb b/spec/acceptance/view_service_performance_spec.rb index da8adaca..ccc6a502 100644 --- a/spec/acceptance/view_service_performance_spec.rb +++ b/spec/acceptance/view_service_performance_spec.rb @@ -99,8 +99,8 @@ end it "the average CO2 values are output" do - expect(response.body).to have_css("#sap-england table.govuk-table td.average-co2-value", text: "15.74") - expect(response.body).to have_css("#rdsap-england table.govuk-table td.average-co2-value", text: "10.88") + expect(response.body).to have_css("#sap-england table.govuk-table td.average-co2-value", text: "15") + expect(response.body).to have_css("#rdsap-england table.govuk-table td.average-co2-value", text: "10") expect(response.body).to have_css("table.govuk-table td.average-co2-value", text: "n/a") end end diff --git a/spec/test_doubles/average_co2_emissions/stub.rb b/spec/test_doubles/average_co2_emissions/stub.rb index bc783ae3..c14554a1 100644 --- a/spec/test_doubles/average_co2_emissions/stub.rb +++ b/spec/test_doubles/average_co2_emissions/stub.rb @@ -6,8 +6,8 @@ def self.get_averages def self.api_data { "data": [ - { "avgCo2Emission" => 10.0, "country" => "Northern Ireland", "yearMonth" => "2022-03" }, - { "avgCo2Emission" => 10.0, "country" => "England", "yearMonth" => "2022-05" }, + { "avgCo2Emission" => 10, "country" => "Northern Ireland", "yearMonth" => "2022-03" }, + { "avgCo2Emission" => 10, "country" => "England", "yearMonth" => "2022-05" }, ] }.to_json end end diff --git a/spec/test_doubles/service_performance/average_co2_emissions_stub.rb b/spec/test_doubles/service_performance/average_co2_emissions_stub.rb index fb01d5e7..1d85b6a5 100644 --- a/spec/test_doubles/service_performance/average_co2_emissions_stub.rb +++ b/spec/test_doubles/service_performance/average_co2_emissions_stub.rb @@ -14,28 +14,28 @@ def self.statistics end private_class_method def self.assessments_stats - { all: [{ "avgCo2Emission": 16.23655, + { all: [{ "avgCo2Emission": 16, "yearMonth": "2021-09", "assessmentType": "SAP" }, - { "avgCo2Emission": 34.345225235, + { "avgCo2Emission": 34, "yearMonth": "2022-03", "assessmentType": "SAP" }, - { "avgCo2Emission": 10.883267, + { "avgCo2Emission": 10, "yearMonth": "2021-09", "assessmentType": "RdSAP" }], - northernIreland: [{ "avgCo2Emission": 34.345225235, + northernIreland: [{ "avgCo2Emission": 34, "country": "Northern Ireland", "yearMonth": "2022-03", "assessmentType": "SAP" }], - england: [{ "avgCo2Emission": 15.7367, + england: [{ "avgCo2Emission": 15, "country": "England", "yearMonth": "2021-09", "assessmentType": "SAP" }, - { "avgCo2Emission": 10.883267, + { "avgCo2Emission": 10, "country": "England", "yearMonth": "2021-09", "assessmentType": "RdSAP" }], - wales: [{ "avgCo2Emission": 16.7364, + wales: [{ "avgCo2Emission": 16, "country": "Wales", "yearMonth": "2022-05", "assessmentType": "SAP" }], diff --git a/spec/unit/domain/shared_statistics.rb b/spec/unit/domain/shared_statistics.rb index ab4afe87..75e1f2dd 100644 --- a/spec/unit/domain/shared_statistics.rb +++ b/spec/unit/domain/shared_statistics.rb @@ -15,10 +15,10 @@ def england { "Month" => "Sep-2021", "SAPs Lodged" => 23_834, "Average SAP Energy Rating" => 77.82, - "Average SAP CO2/sqm emissions" => 15.74, + "Average SAP CO2/sqm emissions" => 15, "RdSAPs Lodged" => 119_033, "Average RdSAP Energy Rating" => 61.74, - "Average RdSAP CO2/sqm emissions" => 10.88, + "Average RdSAP CO2/sqm emissions" => 10, "CEPCs Lodged" => 7572, "Average CEPC Energy Rating" => 68.18, "DECs Lodged" => 3298, @@ -69,10 +69,10 @@ def all_countries { "Month" => "Sep-2021", "SAPs Lodged" => 24_477, "Average SAP Energy Rating" => 77.83, - "Average SAP CO2/sqm emissions" => 16.24, + "Average SAP CO2/sqm emissions" => 16, "RdSAPs Lodged" => 121_499, "Average RdSAP Energy Rating" => 61.71, - "Average RdSAP CO2/sqm emissions" => 10.88, + "Average RdSAP CO2/sqm emissions" => 10, "CEPCs Lodged" => 7718, "Average CEPC Energy Rating" => 68.27, "DECs Lodged" => 3500, diff --git a/spec/unit/domain/statistics_results_spec.rb b/spec/unit/domain/statistics_results_spec.rb index 281e70fe..9bff9389 100644 --- a/spec/unit/domain/statistics_results_spec.rb +++ b/spec/unit/domain/statistics_results_spec.rb @@ -8,13 +8,13 @@ describe "#match_with_warehouse" do it "returns the matching value from the warehouse data" do - expect(domain.match_with_warehouse(month: "2021-09", country: :england, assessment_type: "RdSAP")).to eq [{ assessmentType: "RdSAP", avgCo2Emission: 10.883267, country: "England", yearMonth: "2021-09" }] - expect(domain.match_with_warehouse(month: "2022-03", country: :northernIreland, assessment_type: "SAP")).to eq [{ assessmentType: "SAP", avgCo2Emission: 34.345225235, country: "Northern Ireland", yearMonth: "2022-03" }] + expect(domain.match_with_warehouse(month: "2021-09", country: :england, assessment_type: "RdSAP")).to eq [{ assessmentType: "RdSAP", avgCo2Emission: 10, country: "England", yearMonth: "2021-09" }] + expect(domain.match_with_warehouse(month: "2022-03", country: :northernIreland, assessment_type: "SAP")).to eq [{ assessmentType: "SAP", avgCo2Emission: 34, country: "Northern Ireland", yearMonth: "2022-03" }] end context "when the value of the country key is ':all'" do it "returns the matching value as expected without a country key in the data warehouse item" do - expect(domain.match_with_warehouse(month: "2021-09", country: :all, assessment_type: "SAP")).to eq [{ "avgCo2Emission": 16.23655, "yearMonth": "2021-09", "assessmentType": "SAP" }] + expect(domain.match_with_warehouse(month: "2021-09", country: :all, assessment_type: "SAP")).to eq [{ "avgCo2Emission": 16, "yearMonth": "2021-09", "assessmentType": "SAP" }] end end @@ -28,8 +28,8 @@ describe "#avg_co2" do context "when there is a match with the warehouse data" do it "returns the average co2 for the matching data" do - matched_date_and_country = [{ assessmentType: "SAP", avgCo2Emission: 34.345225235, country: "Northern Ireland", yearMonth: "2022-03" }] - expect(domain.avg_co2(matched_date_and_country:)).to eq 34.35 + matched_date_and_country = [{ assessmentType: "SAP", avgCo2Emission: 34, country: "Northern Ireland", yearMonth: "2022-03" }] + expect(domain.avg_co2(matched_date_and_country:)).to eq 34 end end @@ -45,7 +45,7 @@ context "when there is a CO2 value" do it "updates the register data with the avg CO2 emission value" do reg_data = [{ numAssessments: 20_444, assessmentType: "SAP", ratingAverage: 78.3304347826087, month: "2021-07" }] - avg_co2 = 13.56 + avg_co2 = 13 date = "2021-07" assessment_type = "SAP" domain.update(list: reg_data, avg_co2:, date:, assessment_type:) @@ -71,9 +71,9 @@ end it "matches and joins the expected values" do - expect(domain.results[:england]).to include({ assessmentType: "SAP", avgCo2Emission: 15.74, country: "England", month: "2021-09", numAssessments: 112_499, ratingAverage: 61.7122807017544 }) - expect(domain.results[:england]).to include({ assessmentType: "RdSAP", avgCo2Emission: 10.88, country: "England", month: "2021-09", numAssessments: 121_499, ratingAverage: 61.7122807017544 }) - expect(domain.results[:all]).to include({ assessmentType: "RdSAP", avgCo2Emission: 10.88, month: "2021-09", numAssessments: 121_499, ratingAverage: 61.7122807017544 }) + expect(domain.results[:england]).to include({ assessmentType: "SAP", avgCo2Emission: 15, country: "England", month: "2021-09", numAssessments: 112_499, ratingAverage: 61.7122807017544 }) + expect(domain.results[:england]).to include({ assessmentType: "RdSAP", avgCo2Emission: 10, country: "England", month: "2021-09", numAssessments: 121_499, ratingAverage: 61.7122807017544 }) + expect(domain.results[:all]).to include({ assessmentType: "RdSAP", avgCo2Emission: 10, month: "2021-09", numAssessments: 121_499, ratingAverage: 61.7122807017544 }) end context "when there is no corresponding result from the warehouse data" do diff --git a/spec/unit/use_case/fetch_statistics_spec.rb b/spec/unit/use_case/fetch_statistics_spec.rb index 706e8688..debe5109 100644 --- a/spec/unit/use_case/fetch_statistics_spec.rb +++ b/spec/unit/use_case/fetch_statistics_spec.rb @@ -33,7 +33,7 @@ it "expects SAPs to have average CO2 emissions" do england_result = results[:assessments][:grouped]["SAP"]["England"] - expect(england_result.first[:avgCo2Emission]).to eq 15.74 + expect(england_result.first[:avgCo2Emission]).to eq 15 end end diff --git a/test.html b/test.html deleted file mode 100644 index f0121a3d..00000000 --- a/test.html +++ /dev/null @@ -1,8762 +0,0 @@ - - - - - WebMock::NetConnectNotAllowedError at /service-performance/download-csv - - - - - - -
- - -
-

BACKTRACE

-

(expand)

- -
- - -
- - -
-

GET

- - - - - - - - - - - - -
VariableValue
country
"northern-ireland"
- -
-
- -
-

POST

- -

No POST data.

- -
-
- - -
- - -

No cookie data.

- -
-
- -
-

Rack ENV

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
VariableValue
HTTPS
off
HTTP_COOKIE
HTTP_HOST
find-energy-certificate.epb-frontend
PATH_INFO
/service-performance/download-csv
QUERY_STRING
country=northern-ireland
REMOTE_ADDR
127.0.0.1
REQUEST_METHOD
GET
SCRIPT_NAME
SERVER_NAME
find-energy-certificate.epb-frontend
SERVER_PORT
80
SERVER_PROTOCOL
HTTP/1.0
rack.errors
#<Object:0x000000012d61bec0>
rack.logger
#<Rack::NullLogger:0x000000012dadbd20 @app=#<Rack::Protection::FrameOptions:0x000000012dadbe10 @app=#<Rack::Protection::HttpOrigin:0x000000012dadbf00 @app=#<Rack::Protection::IPSpoofing:0x000000012dadbff0 @app=#<Rack::Protection::JsonCsrf:0x000000012dadc0e0 @app=#<Rack::Protection::PathTraversal:0x000000012dadc1d0 @app=#<Rack::Protection::XSSHeader:0x000000012dadc310 @app=#<FrontendService:0x000000012cf7b908 @default_layout=:layout, @preferred_extension=nil, @app=nil, @template_cache=#<Sinatra::TemplateCache:0x000000012de56ea0 @cache={}>, @pinned_response=nil, @toggles=Helper::Toggles, @container=#<Container:0x000000012de56a90 @objects={:internal_api_client=>#<Auth::HttpClient:0x000000012de56900 @authenticated_client=#<OAuth2::AccessToken:0x00000001287b4a70 @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012d6d7f08 @response=#<Faraday::Response:0x000000012dad1550 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012dad1550 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://test-api.gov.uk", @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>, :internal_data_warehouse_api_client=>#<Auth::HttpClient:0x000000012de56388 @authenticated_client=#<OAuth2::AccessToken:0x000000012daba148 @client=#<OAuth2::Client:0x000000012cf7b278 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b228 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de56180 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b1d8 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56158>, @mon_data_owner_object_id=5780>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012d633908 @client=#<OAuth2::Client:0x000000012cf7b278 ...>>, @connection=#<Faraday::Connection:0x0000000104c5d708 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012d6335c0 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012cf997a0 @app=#<Faraday::Adapter::NetHttp:0x000000012cf7ff58 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012cf787a8 @response=#<Faraday::Response:0x000000012cf93e68 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012cf93e68 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://epb-data-warehouse-api", @client=#<OAuth2::Client:0x000000012cf7b278 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b228 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de56180 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b1d8 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56158>, @mon_data_owner_object_id=5780>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012d633908 @client=#<OAuth2::Client:0x000000012cf7b278 ...>>, @connection=#<Faraday::Connection:0x0000000104c5d708 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012d6335c0 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012cf997a0 @app=#<Faraday::Adapter::NetHttp:0x000000012cf7ff58 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>, :find_assessor_by_postcode_use_case=>#<UseCase::FindAssessorByPostcode:0x000000012dc7ead8 @gateway=#<Gateway::AssessorsGateway:0x000000012de54510 @internal_api_client=#<Auth::HttpClient:0x000000012de56900 @authenticated_client=#<OAuth2::AccessToken:0x00000001287b4a70 @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012d6d7f08 @response=#<Faraday::Response:0x000000012dad1550 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012dad1550 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://test-api.gov.uk", @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>>, :find_non_domestic_assessor_by_postcode_use_case=>#<UseCase::FindNonDomesticAssessorByPostcode:0x000000012dc7e240 @gateway=#<Gateway::AssessorsGateway:0x000000012de54510 @internal_api_client=#<Auth::HttpClient:0x000000012de56900 @authenticated_client=#<OAuth2::AccessToken:0x00000001287b4a70 @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012d6d7f08 @response=#<Faraday::Response:0x000000012dad1550 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012dad1550 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://test-api.gov.uk", @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>>, :find_assessor_by_name_use_case=>#<UseCase::FindAssessorByName:0x000000012dc7da20 @gateway=#<Gateway::AssessorsGateway:0x000000012de54510 @internal_api_client=#<Auth::HttpClient:0x000000012de56900 @authenticated_client=#<OAuth2::AccessToken:0x00000001287b4a70 @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012d6d7f08 @response=#<Faraday::Response:0x000000012dad1550 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012dad1550 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://test-api.gov.uk", @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>>, :fetch_certificate_use_case=>#<UseCase::FetchCertificate:0x000000012dc7b9f0 @gateway=#<Gateway::AssessmentSummaryGateway:0x000000012de52378 @internal_api_client=#<Auth::HttpClient:0x000000012de56900 @authenticated_client=#<OAuth2::AccessToken:0x00000001287b4a70 @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012d6d7f08 @response=#<Faraday::Response:0x000000012dad1550 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012dad1550 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://test-api.gov.uk", @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>>, :find_certificate_by_postcode_use_case=>#<UseCase::FindCertificateByPostcode:0x000000012dc7d098 @gateway=#<Gateway::CertificatesGateway:0x000000012de530e8 @internal_api_client=#<Auth::HttpClient:0x000000012de56900 @authenticated_client=#<OAuth2::AccessToken:0x00000001287b4a70 @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012d6d7f08 @response=#<Faraday::Response:0x000000012dad1550 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012dad1550 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://test-api.gov.uk", @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>>, :find_certificate_by_id_use_case=>#<UseCase::FindCertificateById:0x000000012dc7c4b8 @gateway=#<Gateway::CertificatesGateway:0x000000012de530e8 @internal_api_client=#<Auth::HttpClient:0x000000012de56900 @authenticated_client=#<OAuth2::AccessToken:0x00000001287b4a70 @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012d6d7f08 @response=#<Faraday::Response:0x000000012dad1550 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012dad1550 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://test-api.gov.uk", @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>>, :find_certificate_by_street_name_and_town_use_case=>#<UseCase::FindCertificateByStreetNameAndTown:0x000000012dc7ae38 @gateway=#<Gateway::CertificatesGateway:0x000000012de530e8 @internal_api_client=#<Auth::HttpClient:0x000000012de56900 @authenticated_client=#<OAuth2::AccessToken:0x00000001287b4a70 @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012d6d7f08 @response=#<Faraday::Response:0x000000012dad1550 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012dad1550 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://test-api.gov.uk", @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>>, :fetch_dec_summary_use_case=>#<UseCase::FetchDecSummary:0x000000012dc7a488 @gateway=#<Gateway::CertificatesGateway:0x000000012de530e8 @internal_api_client=#<Auth::HttpClient:0x000000012de56900 @authenticated_client=#<OAuth2::AccessToken:0x00000001287b4a70 @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012d6d7f08 @response=#<Faraday::Response:0x000000012dad1550 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012dad1550 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://test-api.gov.uk", @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>>, :fetch_statistics_use_case=>#<UseCase::FetchStatistics:0x000000012dc77e90 @statistics_gateway=#<Gateway::StatisticsGateway:0x000000012dc78c78 @internal_api_client=#<Auth::HttpClient:0x000000012de56900 @authenticated_client=#<OAuth2::AccessToken:0x00000001287b4a70 @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012d6d7f08 @response=#<Faraday::Response:0x000000012dad1550 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012dad1550 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://test-api.gov.uk", @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>, @co2_gateway=#<Gateway::AverageCo2EmissionsGateway:0x000000012dc77f08 @internal_api_client=#<Auth::HttpClient:0x000000012de56388 @authenticated_client=#<OAuth2::AccessToken:0x000000012daba148 @client=#<OAuth2::Client:0x000000012cf7b278 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b228 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de56180 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b1d8 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56158>, @mon_data_owner_object_id=5780>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012d633908 @client=#<OAuth2::Client:0x000000012cf7b278 ...>>, @connection=#<Faraday::Connection:0x0000000104c5d708 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012d6335c0 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012cf997a0 @app=#<Faraday::Adapter::NetHttp:0x000000012cf7ff58 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012cf787a8 @response=#<Faraday::Response:0x000000012cf93e68 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012cf93e68 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://epb-data-warehouse-api", @client=#<OAuth2::Client:0x000000012cf7b278 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b228 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de56180 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b1d8 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56158>, @mon_data_owner_object_id=5780>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012d633908 @client=#<OAuth2::Client:0x000000012cf7b278 ...>>, @connection=#<Faraday::Connection:0x0000000104c5d708 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012d6335c0 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012cf997a0 @app=#<Faraday::Adapter::NetHttp:0x000000012cf7ff58 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>>, :fetch_statistics_csv_use_case=>#<UseCase::FetchStatisticsCsv:0x000000012dc76d38 @statistics_gateway=#<Gateway::StatisticsGateway:0x000000012dc76dd8 @internal_api_client=#<Auth::HttpClient:0x000000012de56900 @authenticated_client=#<OAuth2::AccessToken:0x00000001287b4a70 @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012d6d7f08 @response=#<Faraday::Response:0x000000012dad1550 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012dad1550 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://test-api.gov.uk", @client=#<OAuth2::Client:0x000000012cf7b638 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b5e8 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de565e0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b598 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56590>, @mon_data_owner_object_id=5760>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012dad73b0 @client=#<OAuth2::Client:0x000000012cf7b638 ...>>, @connection=#<Faraday::Connection:0x00000001287f46c0 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012dad5f10 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012dad27e8 @app=#<Faraday::Adapter::NetHttp:0x00000001287f0f70 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>, @co2_gateway=#<Gateway::AverageCo2EmissionsGateway:0x000000012dc76d88 @internal_api_client=#<Auth::HttpClient:0x000000012de56388 @authenticated_client=#<OAuth2::AccessToken:0x000000012daba148 @client=#<OAuth2::Client:0x000000012cf7b278 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b228 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de56180 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b1d8 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56158>, @mon_data_owner_object_id=5780>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012d633908 @client=#<OAuth2::Client:0x000000012cf7b278 ...>>, @connection=#<Faraday::Connection:0x0000000104c5d708 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012d6335c0 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012cf997a0 @app=#<Faraday::Adapter::NetHttp:0x000000012cf7ff58 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>, @token="abc", @refresh_token=nil, @expires_in=3600, @expires_at=1726824080, @expires_latency=nil, @options={:mode=>:header, :header_format=>"Bearer %s", :param_name=>"access_token"}, @params=#<SnakyHash::StringKeyed token_type="bearer">, @response=#<OAuth2::Response:0x000000012cf787a8 @response=#<Faraday::Response:0x000000012cf93e68 @on_complete_callbacks=[], @env=#<Faraday::Env @method=:post @request_body="client_id=test.id&client_secret=test.client.secret&grant_type=client_credentials" @url=#<URI::HTTP http://test-auth-server.gov.uk/oauth/token> @request=#<Faraday::RequestOptions timeout=8> @request_headers={"User-Agent"=>"Faraday v2.10.1", "Content-Type"=>"application/x-www-form-urlencoded"} @ssl=#<Faraday::SSLOptions (empty)> @response=#<Faraday::Response:0x000000012cf93e68 ...> @response_headers={"content-type"=>"application/json"} @status=200 @reason_phrase="" @response_body="{\"access_token\":\"abc\",\"expires_in\":3600,\"token_type\":\"bearer\"}">>, @options={:parse=>:automatic, :snaky=>true}, @parser=#<Proc:0x000000012c1cdb08 /Users/barryhalper/.rvm/gems/ruby-3.3.4/gems/oauth2-2.0.9/lib/oauth2/response.rb:142>, @parsed=#<SnakyHash::StringKeyed access_token="abc" expires_in=3600 token_type="bearer">>>, @base_uri="http://epb-data-warehouse-api", @client=#<OAuth2::Client:0x000000012cf7b278 @id="test.id", @secret="test.client.secret", @site="http://test-auth-server.gov.uk:80", @options={:authorize_url=>"oauth/authorize", :token_url=>"/oauth/token", :token_method=>:post, :auth_scheme=>:request_body, :connection_opts=>{:request=>{:timeout=>8}}, :connection_build=>nil, :max_redirects=>5, :raise_errors=>false, :logger=>#<Logger:0x000000012cf7b228 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012de56180 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012cf7b1d8 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012de56158>, @mon_data_owner_object_id=5780>, @level_override={}>, :access_token_class=>OAuth2::AccessToken, :authorisation_url=>"/oauth/token"}, @client_credentials=#<OAuth2::Strategy::ClientCredentials:0x000000012d633908 @client=#<OAuth2::Client:0x000000012cf7b278 ...>>, @connection=#<Faraday::Connection:0x0000000104c5d708 @parallel_manager=nil, @headers={"User-Agent"=>"Faraday v2.10.1"}, @params={}, @options=#<Faraday::RequestOptions timeout=8>, @ssl=#<Faraday::SSLOptions (empty)>, @default_parallel_manager=nil, @manual_proxy=false, @builder=#<Faraday::RackBuilder:0x000000012d6335c0 @adapter=Faraday::Adapter::NetHttp, @handlers=[Faraday::Request::UrlEncoded], @app=#<Faraday::Request::UrlEncoded:0x000000012cf997a0 @app=#<Faraday::Adapter::NetHttp:0x000000012cf7ff58 @ssl_cert_store=nil, @app=#<Proc:0x000000012dad28b0(&:response) (lambda)>, @connection_options={}, @config_block=nil>, @options={}>>, @url_prefix=#<URI::HTTP http://test-auth-server.gov.uk/>, @proxy=nil>>>>>}>, @logger=#<Logger:0x000000012a45f328 @level=1, @progname=nil, @default_formatter=#<Logger::Formatter:0x000000012dc76cc0 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x000000012a45f2d8 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDOUT>>, @binmode=false, @mon_data=#<Monitor:0x000000012dc76c98>, @mon_data_owner_object_id=5800>, @level_override={}>>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :xss_mode=>:block, :nosniff=>true, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :allow_if=>nil, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :allow_if=>nil, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>, @options={:reaction=>:drop_session, :logging=>true, :message=>"Forbidden", :encryptor=>Digest::SHA1, :session_key=>"rack.session", :status=>403, :allow_empty_referrer=>true, :report_key=>"protection.failed", :html_types=>["text/html", "application/xhtml", "text/xml", "application/xml"], :frame_options=>:sameorigin, :img_src=>"'self' data:", :font_src=>"'self'", :without_session=>true}>>
rack.request.cookie_hash
{}
rack.request.cookie_string
rack.request.form_hash
{}
rack.request.form_input
nil
rack.request.query_hash
{"country"=>"northern-ireland"}
rack.request.query_string
country=northern-ireland
rack.test
true
rack.url_scheme
http
sinatra.accept
[#<Sinatra::Request::AcceptEntry:0x000000012d59f640 @entry="*/*", @type="*/*", @params={}, @q=1.0>]
sinatra.error
#<WebMock::NetConnectNotAllowedError:"Real HTTP connections are disabled. Unregistered request: GET http://epb-data-warehouse-api/api/avg-co2-emissions with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization'=>'Bearer abc', 'User-Agent'=>'Faraday v2.10.1'}\n\nYou can stub this request with the following snippet:\n\nstub_request(:get, \"http://epb-data-warehouse-api/api/avg-co2-emissions\").\n with(\n headers: {\n\t 'Accept'=>'*/*',\n\t 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',\n\t 'Authorization'=>'Bearer abc',\n\t 'User-Agent'=>'Faraday v2.10.1'\n }).\n to_return(status: 200, body: \"\", headers: {})\n\nregistered request stubs:\n\nstub_request(:get, \"http://test-api.gov.uk/api/statistics\")\nstub_request(:post, \"http://test-auth-server.gov.uk/oauth/token\").\n with(\n body: {\"client_id\"=>\"test.id\", \"client_secret\"=>\"test.client.secret\", \"grant_type\"=>\"client_credentials\"},\n headers: {\n\t 'Accept'=>'*/*',\n\t 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',\n\t 'Content-Type'=>'application/x-www-form-urlencoded'\n })\n\n============================================================">
sinatra.route
GET /service-performance/download-csv
-
-
- -

You're seeing this error because you have -enabled the show_exceptions setting.

-
- -