    @Test
    void getBodyIsCalledOnce() {

        final AtomicInteger counter = new AtomicInteger();
        final HttpRequest httpRequest =
                new HttpRequest("foo", "GET", emptyList(), emptyMap(), null, emptyMap(), (a, b) -> {
                    assertEquals(0, counter.getAndIncrement());
                    return Optional.of(new byte[0]);
                }, new Object[0], null);
        assertEquals(0, counter.get());
        IntStream.range(0, 3).forEach(idx -> {
            assertTrue(httpRequest.getBody().isPresent());
            assertEquals(1, counter.get());
        });
    }