I have a piece of code where different threads manipulating the HashMap.
I have to synchronize this piece of code.
Later, I want to test this using JUnit.
So is it possible to test multithreading using JUnit? 
If yes could you please give me an example.