title: How can I effectively test (unit/integration) concurrent code in Java?
body: <p>I saw <a href="https://stackoverflow.com/questions/12159/how-should-i-unit-test-threaded-code">this</a> post on SO already but it still begs the question, at least for Java. It seems that this should be a pressing issue for any app (i'm testing a web app for this use case) that's multi-threaded. How have you guys dealt with it in a way that allows your threads to interleave -- inherently meaning testing random thread behavior.</p>