标签: junit mockito
public A getA() { A a = Mockito.mock(A.class); Mockito.when(a.setId(Mockito.anyString())).thenReturn("12"); return a; }
无法调用 因为模拟对象是接口实例