test: Fix LinkTest to avoid spurious failure an JDK 10
test: Fix LinkTest to avoid spurious failure an JDK 10

We use latches to wait for close instead of waiting a fixed time.

Signed-off-by: BJ Hargrave <3d26bb3930946e3370762d769a073cece444c2d8@bjhargrave.com>

psoreide/bnd,psoreide/bnd,psoreide/bnd