Returns a collection of classes whose non-abstract methods should always be replaced with
no-ops. By default, this list includes
Composite,
DOM
UIObject,
Widget,
Image, and most subclasses of
Panel. It will also include any
classes specified via the
WithClassesToStub annotation on the test class. This makes
it much safer to test code that uses or extends these types.
This list can be customized via
WithClassesToStub or by defining a new test runner
extending
GwtMockitoTestRunner and overriding this method. This allows users to
explicitly stub out particular classes that are causing problems in tests. If you override this
method, you will probably want to retain the classes that are stubbed here by doing something
like this:
@Override
protected Collection<Class<?>> getClassesToStub() {
Collection<Class<?>> classes = super.getClassesToStub();
classes.add(MyBaseWidget.class);
return classes;
}