@Test public void shouldVerifyWithNullVarArgArray() { Foo foo = Mockito.mock(Foo.class); foo.varArgs((String[]) null); Mockito.verify(foo).varArgs((String[]) Mockito.anyObject()); Mockito.verify(foo).varArgs((String[]) null); }
@Test public void shouldVerifyWithAnyObject() { Foo foo = Mockito.mock(Foo.class); foo.varArgs(""); Mockito.verify(foo).varArgs((String[]) Mockito.anyObject()); Mockito.verify(foo).varArgs((String) Mockito.anyObject()); }