The bank’s Wero services sign every request to EPI’s central service and check every reply. They also wait for EPI to call them back. The JMeter suites needed somewhere to send peer-to-peer payments at load. The live Wero network is not a test bed, and a canned stub would not behave like EPI.
Why a stub was not enough
A stub returns a fixed reply for a URL. That breaks a Wero flow in three places:
- Signatures. The services sign each request. A stub that ignores signatures lets a signing bug pass every test, and it shows up only on the real network.
- State. Requesting money, then cancelling the request, are two calls. The second has to find what the first created, or it fails as a missing request.
- Callbacks. EPI tells the bank when something happens. Without those calls, a payment never reaches its final state.
What I built
A mock of EPI’s central service on WireMock, in a repository I set up from scratch:
- Nine endpoints: the seven calls the bank’s services make to EPI, with realistic replies and errors, and the two callbacks EPI makes back to the bank.
- A signature filter that checks each request’s signature as EPI does, and refuses a bad one.
- State between calls, so a later call sees what an earlier one created.
- A CI pipeline that builds and deploys it.
Earlier in the year I had set up WireMock and a forward proxy to validate Wero in a private cloud. This went further. With the mock running beside a core-banking mock, I ran peer-to-peer payments through the bank’s services at load, without sending one call to the live network.
