@Test
public void socketAnalyzerAwaitPortSuccess() throws IOException {

    ServerSocket blockingSocket = null;
    try {
        final int availablePort = findAvailablePort();
        blockingSocket = new ServerSocket(availablePort);
        Assert.assertFalse(SocketAnalyzer.awaitPortAvailable(availablePort, TIMEOUT, TimeUnit.SECONDS));
    } catch (InterruptedException | IOException e) {
        Assert.fail("SocketAnalyzer test failed.", e);
    } finally {
        if (blockingSocket != null) {
            blockingSocket.close();
        }
    }
}