RegionService { public List<String> countryCodes() { return regionProperties.getCountryCodes(); } @Autowired  RegionService(RegionProperties regionProperties, Region region); List<String> countryCodes(); BoundingBox boundingBox();  }
@Test void should_return_country_codes_from_properties() { List<String> countryCodes = Arrays.asList("XY", "WZ"); when(regionProperties.getCountryCodes()).thenReturn(countryCodes); assertThat(regionService.countryCodes()).isEqualTo(countryCodes); }