### Question:
DefaultCouchManager implements LocalCouch { public static int findFreePort() throws IOException { ServerSocket server = new ServerSocket(0); int port = server.getLocalPort(); server.close(); return port; }  void setCouchDownloader(CouchDownloader couchDownloader); void setUnzipper(Unzipper unzipper); void setLocalCouchPort(int localCouchPort); @Override int getCouchPort(); @Override synchronized CouchDbInstance getCouchInstance(); @Override void installCouchDbEmbedded(); @Override CouchDbConnector getCouchConnector(String name, CouchDbInstance instance); static File getWorkingDir(); boolean haveEmbeddedCouch(); static int findFreePort(); CouchDbInstance getLocalCouchInstance(); CouchDbInstance getEmbeddedCouchInstance(); boolean isLocalCouchRunning(); @Override void setCredentials(String username, String password);  }### Answer:
@Test public void testFindFreePort() throws Exception{ int port = DefaultCouchManager.findFreePort(); System.out.println("Port: " + port); assertTrue(port > 0); }