| 1 |
/* |
| 2 |
* Copyright (c) 2017 Mockito contributors |
| 3 |
* This program is made available under the terms of the MIT License. |
| 4 |
*/ |
| 5 |
package org.mockitoinline; |
| 6 |
|
| 7 |
import org.junit.Test; |
| 8 |
|
| 9 |
import java.util.concurrent.ConcurrentHashMap; |
| 10 |
import java.util.concurrent.ConcurrentMap; |
| 11 |
|
| 12 |
import static org.mockito.Mockito.spy; |
| 13 |
|
| 14 |
public class RecursionTest { |
| 15 |
|
| 16 |
@Test |
| 17 |
public void testMockConcurrentHashMap() { |
| 18 |
ConcurrentMap<String, String> map = spy(new ConcurrentHashMap<String, String>()); |
| 19 |
map.putIfAbsent("a", "b"); |
| 20 |
} |
| 21 |
} |