Skip to content

FINERACT-2533: Add E2E test scenarios for SavingsAccount insufficient balance withdrawal#5646

Open
awaneetdecoder wants to merge 1 commit intoapache:developfrom
awaneetdecoder:FINERACT-2533-savings-e2e-tests
Open

FINERACT-2533: Add E2E test scenarios for SavingsAccount insufficient balance withdrawal#5646
awaneetdecoder wants to merge 1 commit intoapache:developfrom
awaneetdecoder:FINERACT-2533-savings-e2e-tests

Conversation

@awaneetdecoder
Copy link
Contributor

Description

Summary

This PR adds E2E test scenarios for SavingsAccount as suggested by @adamsaghy
in #5623.

Changes

SavingsAccount.feature

  • Added Scenario C2441: Withdrawal fails when account has insufficient balance

SavingsAccountStepDef.java

  • Added step: Client tries to withdraw {double} {string} from savings account on {string} date and expects an error
  • Added step: The savings account withdrawal error response has an HTTP status of {int}
  • Added step: The savings account withdrawal developer message contains {string}

Test Design Decisions

  • Used try/catch FeignException pattern consistent with existing codebase
  • Added Assertions.fail() inside try block to prevent false positives
  • Dynamic currency via ternary operator — avoids hardcoding EUR/USD
  • HTTP 403 confirmed from AbstractPlatformDomainRuleException
  • Error code insufficient.account.balance confirmed from InsufficientAccountBalanceException.java

Closes

Supersedes #5623

@awaneetdecoder awaneetdecoder force-pushed the FINERACT-2533-savings-e2e-tests branch from a40576b to 3e37748 Compare March 18, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant