The easiest way to simulate the machine with the connection "going away" without notice is probably to block(drop) the incoming packets on the connection. A netfilter command like
iptables -A INPUT -p tcp --dport $PORT -j DROP
will do that -- replace $PORT
with the connections local port number. The won't block outgoing packets (which may be an issue if you have keepalives or periodically send stuff.) You can do that with
iptables -A OUTPUT -p tcp --sport $PORT -j DROP
Be sure to remove these filtering rules when you're done, as otherwise they'll stick around and cause problems.