class IndexerUtil {

    private IndexerUtil() {
    }

    /**
     * @return map of HTTP headers to use when making API requests to the web application
     */
    public static MultivaluedMap<String, Object> getWebAppHeaders() {
        MultivaluedMap<String, Object> headers = new MultivaluedHashMap<>();
        String token;
        if ((token = RuntimeEnvironment.getInstance().getIndexerAuthenticationToken()) != null) {
            headers.add(HttpHeaders.AUTHORIZATION, "Bearer " + token);
        }

        return headers;
    }

    /**
     * Enable projects in the remote host application.
     * <p>
     * NOTE: performs a check if the projects are already enabled,
     * before making the change request
     *
     * @param host the url to the remote host
     * @throws ResponseProcessingException in case processing of a received HTTP response fails
     * @throws ProcessingException         in case the request processing or subsequent I/O operation fails
     * @throws WebApplicationException     in case the response status code of the response returned by the server is not successful
     */
    public static void enableProjects(final String host) throws
            ResponseProcessingException,
            ProcessingException,
            WebApplicationException {<FILL_FUNCTION_BODY>}
}


        try (Client client = ClientBuilder.newBuilder().
                connectTimeout(RuntimeEnvironment.getInstance().getConnectTimeout(), TimeUnit.SECONDS).build()) {
            final Invocation.Builder request = client.target(host)
                    .path("api")
                    .path("v1")
                    .path("configuration")
                    .path("projectsEnabled")
                    .request()
                    .headers(getWebAppHeaders());
            final String enabled = request.get(String.class);
            if (!Boolean.parseBoolean(enabled)) {
                try (Response r = request.put(Entity.text(Boolean.TRUE.toString()))) {
                    if (r.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {
                        throw new WebApplicationException(String.format("Unable to enable projects: %s",
                                r.getStatusInfo().getReasonPhrase()), r.getStatus());
                    }
                }
            }
        }
    
<no_super_class>