@Transactional
    public ReviewGroupCreationResponse createReviewGroup(ReviewGroupCreationRequest request) {
        String reviewRequestCode;
        do {
            reviewRequestCode = randomCodeGenerator.generate(REVIEW_REQUEST_CODE_LENGTH);
        } while (reviewGroupRepository.existsByReviewRequestCode(reviewRequestCode));

        ReviewGroup reviewGroup = reviewGroupRepository.save(
                new ReviewGroup(
                        request.revieweeName(), request.projectName(), reviewRequestCode, request.groupAccessCode()
                )
        );
        return new ReviewGroupCreationResponse(reviewGroup.getReviewRequestCode());
    }
@Test
    void 코드가_중복되는_경우_다시_생성한다() {
        // given
        reviewGroupRepository.save(new ReviewGroup("reviewee", "project", "0000", "1111"));
        given(randomCodeGenerator.generate(anyInt()))
                .willReturn("0000") // ReviewRequestCode
                .willReturn("AAAA");

        ReviewGroupCreationRequest request = new ReviewGroupCreationRequest("sancho", "reviewme", "groupAccessCode");

        // when
        ReviewGroupCreationResponse response = reviewGroupService.createReviewGroup(request);

        // then
        assertThat(response).isEqualTo(new ReviewGroupCreationResponse("AAAA"));
        then(randomCodeGenerator).should(times(2)).generate(anyInt());
    }