@Transactional
    public Spending updateSpending(Long spendingId, SpendingReq request) {
        Spending spending = spendingService.readSpending(spendingId).orElseThrow(() -> new SpendingErrorException(SpendingErrorCode.NOT_FOUND_SPENDING));

        SpendingCustomCategory customCategory = (request.isCustomCategory())
                ? spendingCustomCategoryService.readSpendingCustomCategory(request.categoryId()).orElseThrow(() -> new SpendingErrorException(SpendingErrorCode.NOT_FOUND_CUSTOM_CATEGORY))
                : null;

        spending.update(request.amount(), request.icon(), request.spendAt().atStartOfDay(), request.accountName(), request.memo(), customCategory);

        return spending;
    }
@DisplayName("시스템 카테고리를 사용한 지출내역으로 수정할 시, Spending 객체가 수정된다.")
    @Test
    void testUpdateSpendingWithNonCustomCategory() {
        // given
        Long spendingId = 1L;
        given(spendingService.readSpending(spendingId)).willReturn(Optional.of(spending));

        // when - then
        assertDoesNotThrow(() -> spendingUpdateService.updateSpending(spendingId, request));
        assertNull(spending.getSpendingCustomCategory());
    }