A test scenario describes one way an application may behave that should be checked. Identify the scenario, decide how the application should respond, and write a test method to verify it. section 15.1
For a money transfer, scenarios include:
- The source or destination account cannot be found. section 15.1
- The source account lacks enough money, an update fails, or all steps succeed. section 15.1
Insufficient funds
If transfers without sufficient funds are forbidden, test that the application throws the expected exception and does not transfer money. If requirements allow a credit limit, account for that limit in the scenario. section 15.1
Figure 15.3 For any piece of logic you test, you need to find the relevant test scenarios. For each test scenario, you write a test method in a test class. You add the test classes in the app’s Maven project test folder. In this figure, the TransferMoneyUnitTests class is a test class that contains the test scenarios for the transferMoney() method. TransferMoneyUnitTests defines multiple test case methods to test each relevant scenario in the transferMoney()’s method logic.

See how scenarios become test methods within a test class for the transfer operation. section 15.1
