class Cycle0And1MatchRequestSentStateController extends MatchRequestSentStateController<Cycle0And1MatchRequestSentState> {

    @Override
    protected void transitionToNextStateForNoMatchResponse() {
        Optional<String> selfAssertedAttributeName = transactionsConfigProxy.getMatchingProcess(state.getRequestIssuerEntityId()).getAttributeName();
        if (selfAssertedAttributeName.isPresent()) {
            hubEventLogger.logWaitingForCycle3AttributesEvent(state.getSessionId(), state.getRequestIssuerEntityId(), state.getRequestId(), state.getSessionExpiryTimestamp());
            stateTransitionAction.transitionTo(createAwaitingCycle3DataState());
            return;
        }

        List<UserAccountCreationAttribute> userAccountCreationAttributes = transactionsConfigProxy.getUserAccountCreationAttributes(state.getRequestIssuerEntityId());
        if(!userAccountCreationAttributes.isEmpty()) {
            AttributeQueryRequestDto attributeQueryRequestDto = createAttributeQuery(
                    userAccountCreationAttributes,
                    state.getEncryptedMatchingDatasetAssertion(),
                    state.getAuthnStatementAssertion(),
                    state.getPersistentId(),
                    assertionRestrictionFactory.getAssertionExpiry());

            transitionToUserAccountCreationRequestSentState(attributeQueryRequestDto);
            return;
        }

        hubEventLogger.logCycle01NoMatchEvent(
                state.getSessionId(),
                state.getRequestIssuerEntityId(),
                state.getRequestId(),
                state.getSessionExpiryTimestamp());

        stateTransitionAction.transitionTo(createNoMatchState());
    }

    public  Cycle0And1MatchRequestSentStateController(
            final Cycle0And1MatchRequestSentState state,
            final HubEventLogger hubEventLogger,
            final StateTransitionAction stateTransitionAction,
            final PolicyConfiguration policyConfiguration,
            final LevelOfAssuranceValidator validator,
            final TransactionsConfigProxy transactionsConfigProxy,
            final ResponseFromHubFactory responseFromHubFactory,
            final AssertionRestrictionsFactory assertionRestrictionFactory,
            final MatchingServiceConfigProxy matchingServiceConfigProxy,
            final AttributeQueryService attributeQueryService);

}