My application uploads files to server of my client, but he want special "pause upload" function. I cant simply close connection, not even kill process - he need to lost connection otherwise his server application delete unfinished file - so i have to simulate in code "cable unplug" - do you have any suggestion? thanks for your help and sorry for my english :) jirka
You can use Mockito to create a Socket mock for your unit tests, as suggested on this question: Testing Java Sockets
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With