Spring State Machine Learning using a Payment Example
The project was developer using IntelliJ IDE and Project Lombok was used to ignore writing bolier plate code.
Note: Make sure you setup Project Lombok in your preferred IDE to prevet compilation issues.
StateMachineConfigTest and PaymentServiceImplTest are the two test classes.
StateMachineConfigTest: A simple test to validate the State Machine Setup
PaymentServiceImplTest: A full flow test based on random values to mimic values which triggers state changes.