public void setMemoryLimit(final long memoryLimit) {
        if (memoryLimit <= 0) {
            throw new IllegalArgumentException();
        }
        this.memoryLimit = memoryLimit;
    }
@Test
    public void testSetMemoryLimiterWhenIllegal() {
        long lessThanZero = -1;
        MemoryLimiter memoryLimiter = new MemoryLimiter(instrumentation);
        assertThrows(IllegalArgumentException.class, () -> memoryLimiter.setMemoryLimit(lessThanZero));
    }