public static int calculateDefaultNumSlots(
            ResourceProfile totalResourceProfile, ResourceProfile defaultSlotResourceProfile) {
        // For ResourceProfile.ANY in test case, return the maximum integer
        if (totalResourceProfile.equals(ResourceProfile.ANY)) {
            return Integer.MAX_VALUE;
        }

        Preconditions.checkArgument(!defaultSlotResourceProfile.equals(ResourceProfile.ZERO));

        int numSlots = 0;
        ResourceProfile remainResource = totalResourceProfile;
        while (remainResource.allFieldsNoLessThan(defaultSlotResourceProfile)) {
            remainResource = remainResource.subtract(defaultSlotResourceProfile);
            numSlots += 1;
        }
        return numSlots;
    }
@Test
    void testCalculateDefaultNumSlotsFailZeroDefaultSlotProfile() {
        assertThatThrownBy(
                        () ->
                                SlotManagerUtils.calculateDefaultNumSlots(
                                        ResourceProfile.fromResources(1.0, 1),
                                        ResourceProfile.ZERO))
                .isInstanceOf(IllegalArgumentException.class);
    }