When run this test didn't exit. I simply fixed the terminate method to close the server socket and allow the thread executing the server complete. And some minor cleanup.
http://cr.openjdk.java.net/~chegar/7152796/webrev.00/webrev/ -Chris.[1] http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-March/009530.html