This is a quick example of using JMockit ( https://jmockit.dev.java.net/ ) with PircBot. In the pb-mock.zip is an Eclipse project with all that you need in it. The sources are made available in this dir as well if you just want to browse.