<p>I'm experimenting with OpenSSL on my network application and I want to test if the data sent is encrypted and can't be seen by eavesdropper.</p>

<p>What tools can you use to check? Could this be done programmatically so it could be placed in a unit test?</p>

check out wire shark
http://www.wireshark.org/
and tcp dump
http://en.wikipedia.org/wiki/Tcpdump
Not sure about integrating these into unit tests. They will let you look at a very low level whats going on at the network level.
Perhaps for the unit test determine what the stream looks like unencrypted and make sure the encrypted stream is not similar