public boolean reserve(final ResourceProfile reservation) {
        checkResourceProfileNotNullOrUnknown(reservation);
        if (!availableBudget.allFieldsNoLessThan(reservation)) {
            return false;
        }

        availableBudget = availableBudget.subtract(reservation);
        LOG.debug("Resource budget reduced to {}.", availableBudget);
        return true;
    }
@Test
    void testReserve() {
        ResourceBudgetManager budgetManager =
                new ResourceBudgetManager(createResourceProfile(1.0, 100));

        assertThat(budgetManager.reserve(createResourceProfile(0.7, 70))).isEqualTo(true);
        assertThat(budgetManager.getAvailableBudget()).isEqualTo(createResourceProfile(0.3, 30));
    }