@VisibleForTesting
    Request.Builder getRequestBuilder() {
        final Request.Builder requestBuilder = new Request.Builder();

        final String httpMethod = configuration.getString(CK_HTTP_METHOD);
        if (httpMethod == null || httpMethod.equals(GET)) {
            return requestBuilder.get();
        }

        final String body = configuration.getString(CK_HTTP_BODY);
        final MediaType contentType = MediaType.parse(configuration.getString(CK_CONTENT_TYPE));

        switch (httpMethod) {
            case PUT -> requestBuilder.put(RequestBody.create(body, contentType));
            case POST -> requestBuilder.post(RequestBody.create(body, contentType));
        }

        return requestBuilder;
    }
@Test
    @SuppressWarnings("ConstantConditions")
    public void testGetRequestBuilder() throws IOException, NullPointerException {
        Map<String, Object> configVals = Map.of();
        Configuration config = new Configuration(configVals);
        HttpPollTransport httpPollTransport = new HttpPollTransport(config, serverEventBus, serverStatus, scheduler, httpClient, encryptedValueService);
        Request request = httpPollTransport.getRequestBuilder()
                .url("https://url.com")
                .build();

        assertEquals(GET, request.method());
        assertNull(request.body());

        configVals = Map.of(
                CK_HTTP_METHOD, GET,
                CK_HTTP_BODY, "body",
                CK_CONTENT_TYPE, APPLICATION_JSON);
        config = new Configuration(configVals);
        httpPollTransport = new HttpPollTransport(config, serverEventBus, serverStatus, scheduler, httpClient, encryptedValueService);
        request = httpPollTransport.getRequestBuilder()
                .url("https://url.com")
                .build();

        assertEquals(GET, request.method());
        assertNull(request.body());

        configVals = Map.of(
                CK_HTTP_METHOD, POST,
                CK_HTTP_BODY, "body",
                CK_CONTENT_TYPE, APPLICATION_JSON);
        config = new Configuration(configVals);
        httpPollTransport = new HttpPollTransport(config, serverEventBus, serverStatus, scheduler, httpClient, encryptedValueService);
        request = httpPollTransport.getRequestBuilder()
                .url("https://url.com")
                .build();

        assertEquals(POST, request.method());
        assertEquals("body", bodyToString(request));
        assertEquals(APPLICATION_JSON, request.body().contentType().type() + "/" + request.body().contentType().subtype());

        configVals = Map.of(
                CK_HTTP_METHOD, PUT,
                CK_HTTP_BODY, "body",
                CK_CONTENT_TYPE, TEXT_PLAIN);
        config = new Configuration(configVals);
        httpPollTransport = new HttpPollTransport(config, serverEventBus, serverStatus, scheduler, httpClient, encryptedValueService);
        request = httpPollTransport.getRequestBuilder()
                .url("https://url.com")
                .build();

        assertEquals(PUT, request.method());
        assertEquals("body", bodyToString(request));
        assertEquals(TEXT_PLAIN, request.body().contentType().type() + "/" + request.body().contentType().subtype());
    }