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