### Question:
ServerFactory { public static IServer createServer() { int port = getFreePort(); if (!NetUtils.isValidPort(port)) { throw new IllegalStateException("Could not find a valid free port."); } HttpServer server = new HttpServer(port); return server; }  static IServer createServer(); static String getContextMenuDeletePath(); static String getContextMenuVersionsPath(); static String getContextMenuSharePath();  }### Answer:
@Test public void testCreateServer() { IServer server = ServerFactory.createServer(); assertNotNull(server); assertTrue(server.getPort() >= NetUtils.MIN_PORT); assertTrue(server.getPort() <= NetUtils.MAX_PORT); }