このメソッドを次のように宣言しています
private Long doThings(MyEnum enum, Long otherParam);
そしてこの列挙型
public enum MyEnum{
VAL_A,
VAL_B,
VAL_C
}
質問: 模擬doThings()
通話を行うにはどうすればよいですか? 一致するものはありませんMyEnum
。
以下は機能しません。
Mockito.when(object.doThings(Matchers.any(), Matchers.anyLong()))
.thenReturn(123L);