I want to count how many times I do HTTP GET when I use websockets and when I do not use websockets. I expect once when using websockets and n times otherwise. I want to do this through JUnit, and I use Spring too. Are there any creative ways to count the time when I do a GET with a jersey?
client.target(.....).get(....)
I donβt know how to do this without cluttering up my production code with test code.
If the code is defined using an interface, I would use the Decorator pattern to add additional behavior. In this case, additional behavior will track the number of calls.
, Spring. Spring JUnit , Decorated. .
COUNT - . , .