question: private void testConcurrentWrite ( ) throws InterruptedException { final AtomicInteger detected = new AtomicInteger ( ) ; final AtomicInteger notDetected = new AtomicInteger ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { testConcurrentWrite ( detected , notDetected ) ; } assertTrue ( notDetected . get ( ) * 10 <= detected . get ( ) ) ; }
target:  Test what happens on concurrent write. Concurrent write may corrupt the map, so that keys and values may become null.