Basically, you have two options:
- if you want to fully use unit methods to use these methods, you must hide specific (hardware-dependent components such as sockets, etc. behind mockable interfaces, and use bullying in unit tests to verify that expected calls with expected parameters are made with by these objects.
- / /, , , ..
, . , - , , , .. , ( , ) /, , , ( , ).
, run() unit test, . , , , , .
, , , a Callable Runnable, unit test . Executor ( ), concurrency .