### Question:
RegionAddressGenerator { public long newAddress() { ThreadLocalRandom random = ThreadLocalRandom.current(); long address; do { address = newAddressFrom(random.nextLong(maxAddress)); } while (address == INVALID_ADDRESS); return address; } RegionAddressGenerator(CountryRegion region); long newAddress(); boolean isAddressFromRegion(long address);  }### Answer:
@Test public void checkAllBase32() { for (CountryRegion cr : regionIndex.countryRegions()) { RegionAddressGenerator generator = new RegionAddressGenerator(cr); long address = generator.newAddress(); String encodedAddress = AddressUtil.encode(address); assertEquals(cr, regionIndex.matchCountryRegion(encodedAddress)); } }