簡單的方法呼叫驗證

可以使用 Mockito.verify() 驗證是否在模擬上呼叫了方法。

Original mock = Mockito.mock(Original.class);
String param1 = "Expected param value";
int param2 = 100; // Expected param value

//Do something with mock

//Verify if mock was used properly
Mockito.verify(mock).method();
Mockito.verify(mock).methodWithParameters(param1, param2);