Microservices, Test your code

Testing microservices

Now the fun part. Assuming that we have built a running microservice environment, how can we maintain it? How do we introduce changes without breaking it? How do we test it? We know we can do end to end tests, but these are slow and we need faster feedback. How can we test the microservice… Continue reading Testing microservices

Test your code

Are you verifying your stubs?

What is stubbing? What is verifying? Do we need both? If we look into the java docs for Mockito.when() (stubbing) and Mockito.verify() (verifying behavior) we see something strange that is common to both: Although it is possible to verify a stubbed invocation, usually it's just redundant. Well, we known that the difference between stubs and… Continue reading Are you verifying your stubs?