content: package kr.co.fastcampus.eatgo.application;
  
  import kr.co.fastcampus.eatgo.domain.Region;
  import kr.co.fastcampus.eatgo.domain.RegionRepository;
  import org.junit.jupiter.api.BeforeEach;
  import org.junit.jupiter.api.Test;
  import org.mockito.InjectMocks;
  import org.mockito.Mock;
  import org.mockito.MockitoAnnotations;
  
  import java.util.ArrayList;
  import java.util.List;
  
  import static org.assertj.core.api.Assertions.assertThat;
  import static org.mockito.BDDMockito.given;
  
  public class RegionServiceTests {
  
      @InjectMocks
      private RegionService regionService;
  
      @Mock
      private RegionRepository regionRepository;
  
      @BeforeEach
      public void setUp() {
          MockitoAnnotations.initMocks(this);
      }
  
      @Test
      public void getRegions() {
          List<Region> mockRegions = new ArrayList<>();
          mockRegions.add(Region.builder().name("Seoul").build());
  
          given(regionRepository.findAll()).willReturn(mockRegions);
  
          List<Region> regions = regionService.getRegions();
  
          Region region = regions.get(0);
          assertThat(region.getName()).isEqualTo("Seoul");
      }
  
  }
  