class InterceptedRequest {
    private final String id;
    private final ChromeRequest request;
    private final ChromeWindow window;
    private boolean handled;

    public InterceptedRequest(ChromeWindow window, String id, ChromeRequest request) {
        this.window = window;
        this.id = id;
        this.request = request;
    }

    public ChromeRequest getRequest() {
        return request;
    }

    public void fulfill(int status, Collection<Map.Entry<String,String>> headers, byte[] body) {<FILL_FUNCTION_BODY>}

    public void continueNormally() {
        setHandled();
        window.call("Fetch.continueRequest", "requestId", id);
    }

    public boolean isHandled() {
        return handled;
    }

    private void setHandled() {
        if (handled) {
            throw new IllegalStateException("intercepted request already handled");
        }
        handled = true;
    }
}

        setHandled();
        JSONArray headerArray = new JSONArray();
        for (Map.Entry<String,String> entry : headers) {
            JSONObject object = new JSONObject();
            object.put("name", entry.getKey());
            object.put("value", entry.getValue());
            headerArray.put(object);
        }
        String encodedBody = Base64.getEncoder().encodeToString(body);
        request.setResponseFulfilledByInterception(true);
        window.call("Fetch.fulfillRequest",
                "requestId", id,
                "responseCode", status,
                "responseHeaders", headerArray,
                "body", encodedBody);
    
<no_super_class>