Synchronized method - testing junit
Posted on 2009-04-01
I have a method which was not threadsafe, i have now Synchronized it.
Just wondering if i can use Junit it prove that it now working syncronsouly ? I was thinking of instantiating a few threads and then invoking the method.....but not sure this is the correct way.
Just need a Junit test to prove that the method is now Synchronized