public static HostInfo parseHostInfo(final String applicationServerId) {
    if (applicationServerId == null || applicationServerId.trim().isEmpty()) {
      return StreamsMetadataState.UNKNOWN_HOST;
    }

    final String serverId = applicationServerId.endsWith("/")
        ? applicationServerId.substring(0, applicationServerId.lastIndexOf("/"))
        : applicationServerId;

    final String host = getHost(serverId);
    final Integer port = getPort(serverId);

    if (host == null || port == null) {
      throw new KsqlException(String.format(
          "Error parsing host address %s. Expected format host:port.", applicationServerId));
    }

    return new HostInfo(host, port);
  }
@Test
  public void shouldReturnServerPortWithTrailingSlash() {
    // When:
    final HostInfo hostInfo = ServerUtil.parseHostInfo("http://localhost:8088/");

    // Then:
    assertThat(hostInfo.port(), Matchers.is(8088));
  }