diff options
6 files changed, 169 insertions, 36 deletions
| diff --git a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/service/RegisterSearchService.java b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/service/RegisterSearchService.java index 096c9d5f..ff702595 100644 --- a/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/service/RegisterSearchService.java +++ b/modules/authmodule-eIDAS-v2/src/main/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/service/RegisterSearchService.java @@ -107,7 +107,7 @@ public class RegisterSearchService {            resultsZmr.getPersonResult().size(), resultsErnp.getPersonResult().size(),             resultsErnp.getZmrPersonResult().size()); -      return RegisterStatusResults.fromZmrAndErnp(resultsZmr, resultsErnp); +      return RegisterStatusResults.fromZmrAndErnp(operationStatus, resultsZmr, resultsErnp);      } catch (final EidasSAuthenticationException e) {        throw new WorkflowException("searchWithPersonalIdentifier", e.getMessage(), @@ -139,7 +139,7 @@ public class RegisterSearchService {            resultsZmr.getPersonResult().size(), resultsErnp.getPersonResult().size(),             resultsErnp.getZmrPersonResult().size()); -      return RegisterStatusResults.fromZmrAndErnp(resultsZmr, resultsErnp); +      return RegisterStatusResults.fromZmrAndErnp(operationStatus, resultsZmr, resultsErnp);      } catch (final EidasSAuthenticationException e) {        throw new WorkflowException("searchWithMDSOnly", e.getMessage(), @@ -179,7 +179,7 @@ public class RegisterSearchService {              resultsZmr.getPersonResult().size(), resultErnp.getPersonResult().size(),               resultErnp.getZmrPersonResult().size()); -        return RegisterStatusResults.fromZmrAndErnp(resultsZmr, resultErnp); +        return RegisterStatusResults.fromZmrAndErnp(operationStatus, resultsZmr, resultErnp);        } else {          return RegisterStatusResults.fromEmpty(operationStatus); @@ -216,7 +216,7 @@ public class RegisterSearchService {        log.info(LOG_MSG_RESULTS, "seachByResidence",             resultsZmr.getPersonResult().size(), 0, 0); -      return RegisterStatusResults.fromZmr(resultsZmr); +      return RegisterStatusResults.fromZmr(operationStatus, resultsZmr);      } catch (final EidasSAuthenticationException e) {        throw new WorkflowException("searchWithResidenceInformation", e.getMessage(), @@ -251,7 +251,7 @@ public class RegisterSearchService {          ZmrRegisterResult updateZmr = zmrClient              .update(registerResult.getOperationStatus().getZmrProcessId(), entryZmr, initialEidasData);          log.info(LOG_MSG_KITT, ZMR); -        return RegisterStatusResults.fromZmr(updateZmr); +        return RegisterStatusResults.fromZmr(registerResult.operationStatus, updateZmr);        } else {          RegisterResult entryErnp = registerResult.getResultsErnp().get(0); @@ -327,7 +327,7 @@ public class RegisterSearchService {              altSearchResult.getOperationStatus().getZmrProcessId(), entryZmr, altEidasData);          log.info(LOG_MSG_KITT, ZMR);         -        return RegisterStatusResults.fromZmr(updateAlt); +        return RegisterStatusResults.fromZmr(altSearchResult.getOperationStatus(), updateAlt);        } else {          RegisterResult entryErnp = altSearchResult.getResultsErnp().get(0); @@ -376,6 +376,27 @@ public class RegisterSearchService {      private BigInteger zmrProcessId; +    /** +     * Flag that indicates if ERnP entries by user decision is allowed. +     */ +    private final boolean allowErnpEntryByUser; +     + +    /** +     * Build {@link RegisterOperationStatus} based on an existing status 'before'  +     *     and an 'allowErnpEntry' flag of current process. +     *  +     * @param before Status from process-step before +     * @param allowErnpEntry does current result allow new ERnP entry by user +     * @return +     */ +    public static RegisterOperationStatus buildFromExisting(@Nonnull RegisterOperationStatus before,  +        boolean allowErnpEntry) { +      return new RegisterOperationStatus(before.getZmrProcessId(),  +          before.isAllowErnpEntryByUser() && allowErnpEntry); +       +    } +        } @@ -447,12 +468,13 @@ public class RegisterSearchService {        }      } -    static RegisterStatusResults fromZmr(ZmrRegisterResult result) { -      return new RegisterStatusResults(new RegisterOperationStatus(result.getProcessId()), +    static RegisterStatusResults fromZmr(RegisterOperationStatus status, ZmrRegisterResult result) { +      return new RegisterStatusResults(RegisterOperationStatus.buildFromExisting(status, true),            result.getPersonResult(), Collections.emptyList());      } -    static RegisterStatusResults fromZmrAndErnp(ZmrRegisterResult result, ErnpRegisterResult resultErnp) {       +    static RegisterStatusResults fromZmrAndErnp(RegisterOperationStatus status,  +        ZmrRegisterResult result, ErnpRegisterResult resultErnp) {              /*         * Post-processing of ERnP entries to remove entities that included twice.         * In case of KITT on register side that KITTS an ERnP to ZMR entry,  @@ -483,16 +505,25 @@ public class RegisterSearchService {        } -      return new RegisterStatusResults(new RegisterOperationStatus(result.getProcessId()), +      return new RegisterStatusResults( +          status != null  +              ? RegisterOperationStatus.buildFromExisting(status, resultErnp.isAllowErnpEntryByUser())  +              : new RegisterOperationStatus(result.getProcessId(), resultErnp.isAllowErnpEntryByUser()),            zmrCleared, ernpCleared); +            }      static RegisterStatusResults fromErnp(RegisterOperationStatus status, ErnpRegisterResult updateErnp) { -      return new RegisterStatusResults(status, Collections.emptyList(), updateErnp.getPersonResult()); +      return new RegisterStatusResults( +          RegisterOperationStatus.buildFromExisting(status, updateErnp.isAllowErnpEntryByUser()),  +          Collections.emptyList(), updateErnp.getPersonResult()); +            }      static RegisterStatusResults fromEmpty(RegisterOperationStatus status) { -      return new RegisterStatusResults(status, Collections.emptyList(), Collections.emptyList()); +      return new RegisterStatusResults( +          RegisterOperationStatus.buildFromExisting(status, true),  +          Collections.emptyList(), Collections.emptyList());      }    } diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/AlternativeSearchTaskWithRegisterTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/AlternativeSearchTaskWithRegisterTest.java index 305220cf..35560284 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/AlternativeSearchTaskWithRegisterTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/AlternativeSearchTaskWithRegisterTest.java @@ -334,7 +334,7 @@ public class AlternativeSearchTaskWithRegisterTest {      // inject matching intermediate state      RegisterStatusResults matchingState = new RegisterStatusResults( -        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5))), +        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5)), true),          Arrays.asList(RegisterResult.builder()              .bpk("")              .givenName("XXXKlaus - Maria") @@ -454,7 +454,7 @@ public class AlternativeSearchTaskWithRegisterTest {      // inject matching intermediate state      RegisterStatusResults matchingState = new RegisterStatusResults( -        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5))), +        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5)), true),          Arrays.asList(RegisterResult.builder()              .bpk("UgeknNsc26lVuB7U/uYGVmWtnnA=")              .givenName("XXXKlaus - Maria") @@ -550,7 +550,7 @@ public class AlternativeSearchTaskWithRegisterTest {      // inject matching intermediate state      RegisterStatusResults matchingState = new RegisterStatusResults( -        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5))), +        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5)), true),          Arrays.asList(RegisterResult.builder()              .bpk("UgeknNsc26lVuB7U/uYGVmWtnnA=")              .givenName("XXXKlaus - Maria") @@ -651,7 +651,7 @@ public class AlternativeSearchTaskWithRegisterTest {      // inject matching intermediate state      RegisterStatusResults matchingState = new RegisterStatusResults( -        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5))), +        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5)), true),          Arrays.asList(RegisterResult.builder()              .bpk("UgeknNsc26lVuB7U/uYGVmWtnnA=")              .givenName("XXXKlaus - Maria") @@ -714,7 +714,7 @@ public class AlternativeSearchTaskWithRegisterTest {      // inject matching intermediate state      RegisterStatusResults matchingState = new RegisterStatusResults( -        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5))), +        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5)), true),          Arrays.asList(RegisterResult.builder()              .bpk("UgeknNsc26lVuB7U/uYGVmWtnnA=")              .givenName("XXXKlaus - Maria") @@ -793,7 +793,7 @@ public class AlternativeSearchTaskWithRegisterTest {      // inject matching intermediate state      RegisterStatusResults matchingState = new RegisterStatusResults( -        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5))), +        new RegisterOperationStatus(new BigInteger(RandomStringUtils.randomNumeric(5)), true),          Arrays.asList(RegisterResult.builder()              .bpk("UgeknNsc26lVuB7U/uYGVmWtnnA=")              .givenName("XXXKlaus - Maria") diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskTest.java index ca78e156..20a1bb7f 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/InitialSearchTaskTest.java @@ -806,7 +806,7 @@ public class InitialSearchTaskTest {      task.execute(pendingReq, executionContext);      // validate state -    checkIntermediateResult(1); +    checkIntermediateResult(1, true);    } @@ -837,7 +837,7 @@ public class InitialSearchTaskTest {      task.execute(pendingReq, executionContext);      // validate state -    checkIntermediateResult(1); +    checkIntermediateResult(1, true);    } @@ -869,7 +869,7 @@ public class InitialSearchTaskTest {      task.execute(pendingReq, executionContext);      // validate state -    checkIntermediateResult(2); +    checkIntermediateResult(2, true);      DetailedMatchtingStatistic entry = MatchingTaskUtils.getDetailedMatchingStatistic(pendingReq);      assertNotNull("statisticLogEntry", entry);     @@ -881,6 +881,94 @@ public class InitialSearchTaskTest {    }    /** +   * Find matches with MDS search in ZMR and ERnP. +   */ +  @Test +  @DirtiesContext +  @SneakyThrows +  public void resultByMdsSearch_ZmrAndClosedErnp() throws TaskExecutionException, EidasSAuthenticationException { +    BigInteger zmrProcessId = generateRandomProcessId(); +    Mockito.when(zmrClient.searchWithPersonIdentifier(null, randomPseudonym, DE)) +        .thenReturn(new ZmrRegisterResult(Collections.emptyList(), zmrProcessId)); +    Mockito.when(zmrClient.searchWithMds(zmrProcessId, randomGivenName, randomFamilyName, randomBirthDate, DE)) +        .thenReturn(zmrRegisterResult(randomRegisterResult(), zmrProcessId)); +    Mockito.when(zmrClient.update(any(), any(), any())) +        .thenThrow(new IllegalStateException("ZMR update should not be neccessary")); + +    Mockito.when(ernpClient.searchWithPersonIdentifier(randomPseudonym, DE)).thenReturn( +        closedErnpRegisterResult()); +    Mockito.when(ernpClient.searchWithMds(randomGivenName, randomFamilyName, randomBirthDate, DE)) +        .thenReturn(ernpRegisterResult(randomRegisterResult(RandomStringUtils.randomAlphanumeric(10)))); +    Mockito.when(ernpClient.update(any(), any())) +        .thenThrow(new IllegalStateException("ERnP update should not be neccessary")); + +     + +    // execute test +    task.execute(pendingReq, executionContext); + +    // validate state +    checkIntermediateResult(2, false); +     +    DetailedMatchtingStatistic entry = MatchingTaskUtils.getDetailedMatchingStatistic(pendingReq); +    assertNotNull("statisticLogEntry", entry);     +    assertEquals("ZMR", 0, entry.getPersonalIdResult().getZmrResults());     +    assertEquals("ERnP", 0, entry.getPersonalIdResult().getErnpResults()); +    assertEquals("ZMR", 1, entry.getMdsResult().getZmrResults());     +    assertEquals("ERnP", 1, entry.getMdsResult().getErnpResults()); +     +  } +   +  /** +   * Find matches with MDS search in ZMR and ERnP. +   */ +  @Test +  @DirtiesContext +  @SneakyThrows +  public void resultByMdsSearch_ZmrAndClosedErnpCcSpecific() throws TaskExecutionException, EidasSAuthenticationException { +    final AuthenticationResponse response = buildDummyAuthResponseDE(randomGivenName, randomFamilyName, +        randomPersonalIdentifier_DE, randomBirthDate, randomPlaceOfBirth, randomBirthName); +    TestRequestImpl pendingReq1 = new TestRequestImpl(); +    pendingReq1.getSessionData(AuthProcessDataWrapper.class) +        .setGenericDataToSession(Constants.DATA_FULL_EIDAS_RESPONSE, response); +     +    BigInteger zmrProcessId = generateRandomProcessId(); +    Mockito.when(zmrClient.searchWithPersonIdentifier(null, randomPseudonym, DE)) +        .thenReturn(new ZmrRegisterResult(Collections.emptyList(), zmrProcessId));     +    Mockito.when(zmrClient.searchCountrySpecific(any(),any(), eq(DE))) +        .thenReturn(new ZmrRegisterResult(Collections.emptyList(), zmrProcessId)); +    Mockito.when(zmrClient.searchWithMds(zmrProcessId, randomGivenName, randomFamilyName, randomBirthDate, DE)) +        .thenReturn(zmrRegisterResult(randomRegisterResult(), zmrProcessId)); +    Mockito.when(zmrClient.update(any(), any(), any())) +        .thenThrow(new IllegalStateException("ZMR update should not be neccessary")); + +    Mockito.when(ernpClient.searchWithPersonIdentifier(randomPseudonym, DE)).thenReturn( +        emptyErnpRegisterResult()); +    Mockito.when(ernpClient.searchCountrySpecific(any(), eq(DE))).thenReturn( +        closedErnpRegisterResult());     +    Mockito.when(ernpClient.searchWithMds(randomGivenName, randomFamilyName, randomBirthDate, DE)) +        .thenReturn(ernpRegisterResult(randomRegisterResult(RandomStringUtils.randomAlphanumeric(10)))); +    Mockito.when(ernpClient.update(any(), any())) +        .thenThrow(new IllegalStateException("ERnP update should not be neccessary")); + +     + +    // execute test +    task.execute(pendingReq1, executionContext); + +    // validate state +    checkIntermediateResult(pendingReq1, 2, false); +     +    DetailedMatchtingStatistic entry = MatchingTaskUtils.getDetailedMatchingStatistic(pendingReq1); +    assertNotNull("statisticLogEntry", entry);     +    assertEquals("ZMR", 0, entry.getPersonalIdResult().getZmrResults());     +    assertEquals("ERnP", 0, entry.getPersonalIdResult().getErnpResults()); +    assertEquals("ZMR", 1, entry.getMdsResult().getZmrResults());     +    assertEquals("ERnP", 1, entry.getMdsResult().getErnpResults()); +     +  } +   +  /**     * resultByMdsSearch     */    @Test @@ -905,7 +993,7 @@ public class InitialSearchTaskTest {      task.execute(pendingReq, executionContext);      // validate state -    checkIntermediateResult(3); +    checkIntermediateResult(3, true);    } @@ -920,6 +1008,11 @@ public class InitialSearchTaskTest {    }    @NotNull +  private ErnpRegisterResult closedErnpRegisterResult() { +    return new ErnpRegisterResult(Collections.emptyList(), false); +  } +   +  @NotNull    private ZmrRegisterResult zmrRegisterResult(RegisterResult registerResult, BigInteger processId) {      return new ZmrRegisterResult(Collections.singletonList(registerResult), processId);    } @@ -1011,20 +1104,29 @@ public class InitialSearchTaskTest {    } -  private void checkIntermediateResult(int resultSize) { +  private void checkIntermediateResult(TestRequestImpl pendingReq1, int resultSize, boolean allowNewErnp) {      Boolean transitionGUI = (Boolean) executionContext.get(Constants.TRANSITION_TO_GENERATE_OTHER_LOGIN_METHOD_GUI_TASK);      Assert.assertTrue("Wrong transition", transitionGUI);      Boolean transitionErnb = (Boolean) executionContext.get(Constants.TRANSITION_TO_CREATE_NEW_ERNP_ENTRY_TASK);      Assert.assertNull("Wrong transition", transitionErnb); -    assertNotNull("find no eIDAS inbut data", MatchingTaskUtils.getInitialEidasData(pendingReq)); +    assertNotNull("find no eIDAS inbut data", MatchingTaskUtils.getInitialEidasData(pendingReq1));      assertNull("Find final matching data but no match sould be found", -        MatchingTaskUtils.getFinalMatchingResult(pendingReq)); +        MatchingTaskUtils.getFinalMatchingResult(pendingReq1)); -    RegisterStatusResults result = MatchingTaskUtils.getIntermediateMatchingResult(pendingReq); +    RegisterStatusResults result = MatchingTaskUtils.getIntermediateMatchingResult(pendingReq1);      assertNotNull("Find no intermediate matching data", result);      assertEquals("wrong intermediate result size", resultSize, result.getResultCount()); +    assertNotNull("no operationStatus", result.getOperationStatus()); +    assertEquals("newErnpEntryFlag", allowNewErnp, result.getOperationStatus().isAllowErnpEntryByUser()); + +     +  } +   +  private void checkIntermediateResult(int resultSize, boolean allowNewErnp) { +    checkIntermediateResult(pendingReq,  resultSize, allowNewErnp); +        }    @NotNull diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskRegisterTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskRegisterTest.java index 8d3959f4..a3e8ee9c 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskRegisterTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskRegisterTest.java @@ -240,7 +240,7 @@ public class ReceiveAustrianResidenceGuiResponseTaskRegisterTest {    @NotNull    private RegisterStatusResults buildEmptyResult() { -    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), +    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId(), true),          Collections.emptyList(), Collections.emptyList());    } @@ -252,7 +252,7 @@ public class ReceiveAustrianResidenceGuiResponseTaskRegisterTest {    @NotNull    private RegisterStatusResults buildResultWithOneMatch(RegisterResult registerResult) { -    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), +    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId(), true),          Collections.singletonList(registerResult), Collections.emptyList());    } @@ -260,7 +260,7 @@ public class ReceiveAustrianResidenceGuiResponseTaskRegisterTest {    @NotNull    private RegisterStatusResults buildResultWithTwoMatches() {      List<RegisterResult> results = Lists.newArrayList(buildRandomRegisterResult(), buildRandomRegisterResult()); -    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), +    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId(), true),          results, Collections.emptyList());    } diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskTest.java index 83284455..581dee0d 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveAustrianResidenceGuiResponseTaskTest.java @@ -237,7 +237,7 @@ public class ReceiveAustrianResidenceGuiResponseTaskTest {    @NotNull    private RegisterStatusResults buildEmptyResult() { -    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), +    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId(), true),          Collections.emptyList(), Collections.emptyList());    } @@ -249,7 +249,7 @@ public class ReceiveAustrianResidenceGuiResponseTaskTest {    @NotNull    private RegisterStatusResults buildResultWithOneMatch(RegisterResult registerResult) { -    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), +    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId(), true),          Collections.singletonList(registerResult), Collections.emptyList());    } @@ -257,7 +257,7 @@ public class ReceiveAustrianResidenceGuiResponseTaskTest {    @NotNull    private RegisterStatusResults buildResultWithTwoMatches() {      List<RegisterResult> results = Lists.newArrayList(buildRandomRegisterResult(), buildRandomRegisterResult()); -    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), +    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId(), true),          results, Collections.emptyList());    } diff --git a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveMobilePhoneSignatureResponseTaskTest.java b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveMobilePhoneSignatureResponseTaskTest.java index 034f06d1..9bb27100 100644 --- a/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveMobilePhoneSignatureResponseTaskTest.java +++ b/modules/authmodule-eIDAS-v2/src/test/java/at/asitplus/eidas/specific/modules/auth/eidas/v2/test/tasks/ReceiveMobilePhoneSignatureResponseTaskTest.java @@ -344,7 +344,7 @@ public class ReceiveMobilePhoneSignatureResponseTaskTest {      AuthProcessDataWrapper authProcessData = pendingReq.getSessionData(AuthProcessDataWrapper.class);      SimpleEidasData eidData = createEidasDataMatchingToSamlResponse().build();      authProcessData.setGenericDataToSession(Constants.DATA_SIMPLE_EIDAS, eidData); -    RegisterStatusResults registerSearchResult = new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), +    RegisterStatusResults registerSearchResult = new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId(), true),          Collections.emptyList(), Collections.emptyList());      MatchingTaskUtils.storeIntermediateMatchingResult(pendingReq, registerSearchResult); @@ -426,7 +426,7 @@ public class ReceiveMobilePhoneSignatureResponseTaskTest {    @NotNull    private RegisterStatusResults buildResultWithOneMatch() { -    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), +    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId(), true),          Collections.singletonList(RegisterResult.builder()              .bpk(BPK_FROM_ID_AUSTRIA)              .pseudonym(Arrays.asList("bar")) @@ -456,10 +456,10 @@ public class ReceiveMobilePhoneSignatureResponseTaskTest {              .dateOfBirth("dateOfBirth")              .build()); -    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId()), +    return new RegisterStatusResults(new RegisterOperationStatus(generateRandomProcessId(), true),          results, Collections.emptyList());    } - +      private BigInteger generateRandomProcessId() {      return new BigInteger(RandomStringUtils.randomNumeric(10)); | 
