public boolean checkOrigin(String origin) {
    try {
      return CorsUtils.isValidOrigin(origin, zConf);
    } catch (UnknownHostException | URISyntaxException e) {
      LOG.error(e.toString(), e);
    }
    return false;
  }
@Test
  void checkOrigin() throws UnknownHostException {
    String origin = "http://" + InetAddress.getLocalHost().getHostName() + ":8080";
    assertTrue(notebookServer.checkOrigin(origin),
      "Origin " + origin + " is not allowed. Please check your hostname.");
  }