public long computeMemorySize(double fraction) {
        validateFraction(fraction);

        return (long) Math.floor(memoryBudget.getTotalMemorySize() * fraction);
    }
@Test
    void testComputeMemorySizeFailForNegativeFraction() {
        assertThatExceptionOfType(IllegalArgumentException.class)
                .isThrownBy(() -> memoryManager.computeMemorySize(-0.1));
    }