How to simulate java socket connection break?
<p>I have written java application that makes socket connections with a legacy system. </p>

<p>How can I simulate the connection failure <em>(Eg Socket connection timeout, read timeout, network failure)</em>, so that i can add necessary code based on the exception trace ? </p>
