私は簡単なテストケースを持っています:
@Test
public void test() throws Exception{
TableElement table = mock(TableElement.class);
table.insertRow(0);
}
TableElementは、メソッドがinsertRow
次のように定義されたGWTクラスです。
public final native TableRowElement insertRow(int index);
テストを開始すると、次のようになります。
java.lang.UnsatisfiedLinkError: com.google.gwt.dom.client.TableElement.insertRow(I)Lcom/google/gwt/dom/client/TableRowElement;
at com.google.gwt.dom.client.TableElement.insertRow(Native Method)
これは、insertRowメソッドがネイティブであることに関連していると私は信じています。Mockitoでそのようなメソッドをモックする方法または回避策はありますか?