private String buildAbsoluteUrl(final String basePath, final String path) {
        final StringBuilder sb = new StringBuilder();

        if (basePath != null) {
            sb.append(basePath);
            if (basePath.endsWith("/")) {
                sb.setLength(sb.length() - 1);
            }
        }

        if (path != null && !path.isEmpty() && !path.equals("/")) {
            if (!path.startsWith("/")) {
                sb.append("/");
            }
            sb.append(path);
        }
        return sb.toString();
    }
Helper method to build a URL on the API Gateway using the supplied
path

@param path e.g. /users
stroom-app/src/main/java/stroom/app/uri/UriFactoryImpl.java