To use stubs in junit, you do not need any frameworks.
If you want to drown out some kind of interface, just do it:
interface Service { String doSomething(); } class ServiceStub implements Service { public String doSomething(){ return "my stubbed return"; } }
Then create a new stub object and add it to the test object.
If you want to remove a specific class, create a subclass and override the encoded methods:
class Service { public String doSomething(){
source share