1 /* 2 * Copyright (c) 2007 Mockito contributors 3 * This program is made available under the terms of the MIT License. 4 */ 5 6 package org.mockitousage.bugs; 7 8 import org.junit.Test; 9 import org.mockitoutil.TestBase; 10 11 import static org.mockito.Mockito.*; 12 13 //see issue 221 14 public class NPEOnAnyClassMatcherAutounboxTest extends TestBase { 15 16 interface Foo { 17 void bar(long id); 18 } 19 20 @Test 21 public void shouldNotThrowNPE() { 22 Foo f = mock(Foo.class); 23 f.bar(1); 24 verify(f).bar(any(Long.class)); 25 } 26 } 27