private static int getFreePort() throws IOException {
        try (ServerSocket socket = new ServerSocket(0)) {
            socket.setReuseAddress(true);
            return socket.getLocalPort();
        }
    }
Tests that an application with search chains referencing a content cluster can be constructed.
application/src/test/java/com/yahoo/application/ApplicationTest.java