@Transactional
    public boolean disable(ResourceId resourceId, TimeSlot timeSlot, Owner requester) {
        ResourceGroupedAvailability toDisable = findGrouped(resourceId, timeSlot);
        if (toDisable.hasNoSlots()) {
            return false;
        }
        Set<Owner> previousOwners = toDisable.owners();
        boolean result = toDisable.disable(requester);
        if (result) {
            result = availabilityRepository.saveCheckingVersion(toDisable);
            if (result) {
                eventsPublisher.publish(new ResourceTakenOver(resourceId, previousOwners, timeSlot, Instant.now(clock)));
            }
        }
        return result;
    }
@Test
    void cantDisableWhenNoSlotsCreated() {
        //given
        ResourceId resourceId = ResourceId.newOne();
        TimeSlot oneDay = TimeSlot.createDailyTimeSlotAtUTC(2021, 1, 1);
        Owner owner = Owner.newOne();

        //when
        boolean result = availabilityFacade.disable(resourceId, oneDay, owner);

        //then
        assertFalse(result);
    }