title: How to Simulate a hung thread in a multi threaded environment?
body: <p>We have a Java multi threaded environment processing millions of records. In production, some threads have been observed to be hung, waiting for a synchronized method.. Work around was provided by removing dependency on synchronized method.</p>
  
  <p>But, still unable to replicate the issue in Dev environment, that multiple threads are hung on a synchronized method. In Dev, all threads are completed in every attempt. Any suggestions how to replicate the issue in Dev to unit test the patch?? </p>
  
  <p>After more analysis, it seems the case of starvation.Any pointers on how to simulate starvation in executor framework ?</p>