Generating an IOException When Closing a Socket/ServerSocket
Hi Everyone!
Can somebody tell me how to generate an IOException when closing a socket because I'm currently making a junit test case and i want to test my exception handling. Kindly check the code below.
try
{
serverSocket.close();// <<-- this should throw an IOException.
}
catch(IOException e)
{
// This is the part that I want to test.
}
Thanks!

