Currently, we struggle to test edge cases for many higher-level components due to our test suite setup.
The test suite is constructed from mainnet state. As a result, it primarily validates basic happy path invariants. Due to us frequently updating mainnet state and it changing over time, we cannot make detailed assertions as to avoid flakiness.
For testing the edge cases, we should instead mock out the lower-level components and create detailed table-drive unit tests.
Major components to mock out and test:
- Router usecase
- Tokens usecase
- Pools usecase
Note that this is a large effort that is to be converted into a bigger project with sub-tasks once scop is defined