### Question:
AuthnRequestFromTransactionHandler { public AuthnResponseFromCountryContainerDto getAuthnResponseFromCountryContainerDto(SessionId sessionId) { NonMatchingJourneySuccessStateController stateController = (NonMatchingJourneySuccessStateController) sessionRepository.getStateController(sessionId, ResponsePreparedState.class); NonMatchingJourneySuccessState state = stateController.getState(); return new AuthnResponseFromCountryContainerDto( state.getCountrySignedResponseContainer().get(), state.getAssertionConsumerServiceUri(), state.getRelayState(), state.getRequestId(), state.getRequestIssuerEntityId(), idGenerator.getId() ); } @Inject  AuthnRequestFromTransactionHandler(
            SessionRepository sessionRepository,
            HubEventLogger hubEventLogger,
            PolicyConfiguration policyConfiguration,
            TransactionsConfigProxy transactionsConfigProxy,
            IdGenerator idGenerator); SessionId handleRequestFromTransaction(SamlResponseWithAuthnRequestInformationDto samlResponse, Optional<String> relayState, String ipAddress, URI assertionConsumerServiceUri, boolean transactionSupportsEidas); void tryAnotherIdp(final SessionId sessionId); void restartJourney(final SessionId sessionId); void selectIdpForGivenSessionId(SessionId sessionId, IdpSelected idpSelected); AuthnRequestFromHub getIdaAuthnRequestFromHub(SessionId sessionId); AuthnRequestSignInProcess getSignInProcessDto(SessionId sessionIdParameter); String getRequestIssuerId(SessionId sessionId); ResponseFromHub getResponseFromHub(SessionId sessionId); ResponseFromHub getErrorResponseFromHub(SessionId sessionId); AuthnResponseFromCountryContainerDto getAuthnResponseFromCountryContainerDto(SessionId sessionId); boolean isResponseFromCountryWithUnsignedAssertions(SessionId sessionId);  }### Answer:
@Test public void getAuthnResponseFromCountryContainerDtoReturnsAnAuthnResponseFromCountryContainerDto() throws URISyntaxException { NonMatchingJourneySuccessStateController stateContoller = mock(NonMatchingJourneySuccessStateController.class); when(sessionRepository.getStateController(SESSION_ID, ResponsePreparedState.class)).thenReturn(stateContoller); when(stateContoller.getState()).thenReturn(setupNonMatchingJourneySuccessState(SESSION_ID, true)); when(idGenerator.getId()).thenReturn(GENERATED_ID); AuthnResponseFromCountryContainerDto responseDto = authnRequestFromTransactionHandler.getAuthnResponseFromCountryContainerDto(SESSION_ID); assertThat(responseDto.getSamlResponse()).isEqualTo(SAML_RESPONSE); assertThat(responseDto.getEncryptedKeys()).isEqualTo(asList(ENCRYPTED_KEY)); assertThat(responseDto.getPostEndpoint()).isEqualTo(ASSERTION_CONSUMER_SERVICE_URI); assertThat(responseDto.getRelayState().get()).isEqualTo(RELAY_STATE); assertThat(responseDto.getInResponseTo()).isEqualTo(REQUEST_ID); assertThat(responseDto.getResponseId()).isEqualTo(GENERATED_ID); }