For a long while I’ve been looking forward to mocking void methods, I always thought that would be fairly impossible. After a long search online I’ve found it how to do it. So this example is from my work, it is a simple dummy method which creates a user on a 3rd party system. import
Now a days while I discover TDD and testing in software development, I’ve come to realize that it is also possible to test exceptions in Junit as well. I’ve noticed this while I was checking a code snippet of a software online and right after that I’ve tested the same thing to see the outcome.