@Test void generateNispIban() { stubGetSelfCall(TPP_ID, getAccountAccess(), UserRoleTO.STAFF); String s = generationService.generateIbanForNisp(getPayload(), "00"); assertTrue(StringUtils.isNotBlank(s)); }
public String generateIbanForNisp(DataPayload payload, String iban) { if (payload.getGeneratedIbans().containsKey(iban)) { return payload.getGeneratedIbans().get(iban); } TppData data = new TppData(userMgmtRestClient.getUser().getBody()); String generatedIban = generateIban(data.getCountryCode(), data.getBranchId(), Long.parseLong(iban)); payload.getGeneratedIbans().put(iban, generatedIban); return generatedIban; }
IbanGenerationService { public String generateIbanForNisp(DataPayload payload, String iban) { if (payload.getGeneratedIbans().containsKey(iban)) { return payload.getGeneratedIbans().get(iban); } TppData data = new TppData(userMgmtRestClient.getUser().getBody()); String generatedIban = generateIban(data.getCountryCode(), data.getBranchId(), Long.parseLong(iban)); payload.getGeneratedIbans().put(iban, generatedIban); return generatedIban; } }
IbanGenerationService { public String generateIbanForNisp(DataPayload payload, String iban) { if (payload.getGeneratedIbans().containsKey(iban)) { return payload.getGeneratedIbans().get(iban); } TppData data = new TppData(userMgmtRestClient.getUser().getBody()); String generatedIban = generateIban(data.getCountryCode(), data.getBranchId(), Long.parseLong(iban)); payload.getGeneratedIbans().put(iban, generatedIban); return generatedIban; }  }
IbanGenerationService { public String generateIbanForNisp(DataPayload payload, String iban) { if (payload.getGeneratedIbans().containsKey(iban)) { return payload.getGeneratedIbans().get(iban); } TppData data = new TppData(userMgmtRestClient.getUser().getBody()); String generatedIban = generateIban(data.getCountryCode(), data.getBranchId(), Long.parseLong(iban)); payload.getGeneratedIbans().put(iban, generatedIban); return generatedIban; }  String generateNextIban(String tppId); String generateIbanForNisp(DataPayload payload, String iban); Map<CountryCode, String> getCountryCodes(); BankCodeStructure getBankCodeStructure(CountryCode code); }
IbanGenerationService { public String generateIbanForNisp(DataPayload payload, String iban) { if (payload.getGeneratedIbans().containsKey(iban)) { return payload.getGeneratedIbans().get(iban); } TppData data = new TppData(userMgmtRestClient.getUser().getBody()); String generatedIban = generateIban(data.getCountryCode(), data.getBranchId(), Long.parseLong(iban)); payload.getGeneratedIbans().put(iban, generatedIban); return generatedIban; }  String generateNextIban(String tppId); String generateIbanForNisp(DataPayload payload, String iban); Map<CountryCode, String> getCountryCodes(); BankCodeStructure getBankCodeStructure(CountryCode code);  }