I setup a mock for the MenuItem.setTitle method, but the mock isn't working. It was working before we updated our SmartClient version.
GwtMockito version: 1.1.9
SmartClient version: 12.1-p20200821 (com.isomorphic.smartgwt.lgpl)
Previous SmartClient version: 6.1-p20171202 (Tests were working with this version)
This error occurs when a call is made to the setTitle method on the mock object.
java.lang.ClassCastException: class java.lang.String cannot be cast to class com.smartgwt.client.widgets.menu.MenuItem (java.lang.String is in module java.base of loader 'bootstrap'; com.smartgwt.client.widgets.menu.MenuItem is in unnamed module of loader com.google.gwtmockito.GwtMockitoTestRunner$GwtMockitoClassLoader @6b73368a)
at com.smartgwt.client.widgets.menu.MenuItem$MockitoMock$686859786.setTitle(Unknown Source)
It looks like the latest version of SmartGWT changed setTitle to return a MenuItem instead of void. Have you adjusted your mock to return itself from calls to setTitle?
I setup a mock for the
MenuItem.setTitle
method, but the mock isn't working. It was working before we updated our SmartClient version.GwtMockito version: 1.1.9
SmartClient version: 12.1-p20200821 (com.isomorphic.smartgwt.lgpl) Previous SmartClient version: 6.1-p20171202 (Tests were working with this version)
This error occurs when a call is made to the
setTitle
method on the mock object.