### Question:
AzureRegionHelper implements CloudRegionHelper<AzureRegion, AzureRegionCredentials> { void validateStoragePolicy(final AzurePolicy policy) { if (Objects.isNull(policy) || (StringUtils.isBlank(policy.getIpMax()) && StringUtils.isBlank(policy.getIpMin()))) { return; } Assert.isTrue(StringUtils.isNotBlank(policy.getIpMax()) && StringUtils.isNotBlank(policy.getIpMin()), messageHelper.getMessage(MessageConstants.ERROR_AZURE_IP_RANGE_IS_INVALID, policy.getIpMax(), policy.getIpMin())); Assert.isTrue(NetworkUtils.isValidIpAddress(policy.getIpMax()), messageHelper.getMessage(MessageConstants.ERROR_AZURE_IP_IS_INVALID, policy.getIpMax())); Assert.isTrue(NetworkUtils.isValidIpAddress(policy.getIpMin()), messageHelper.getMessage(MessageConstants.ERROR_AZURE_IP_IS_INVALID, policy.getIpMin())); Assert.isTrue(NetworkUtils.isIpRangeValid(policy), messageHelper .getMessage(MessageConstants.ERROR_AZURE_IP_RANGE_IS_INVALID, policy.getIpMax(), policy.getIpMin())); }  @Override CloudProvider getProvider(); @Override void validateRegion(final AzureRegion region, final AzureRegionCredentials credentials); @Override List<String> loadAvailableRegions(); @Override AzureRegion mergeRegions(final AzureRegion originalRegion, final AzureRegion updatedRegion); @Override AzureRegionCredentials mergeCredentials(final AzureRegionCredentials oldCredentials,
                                                   final AzureRegionCredentials updatedCredentials); String serializeCredentials(AzureRegion region, AzureRegionCredentials credentials);  }### Answer:
@Test public void shouldThrowIfMinIpMoreThanMaxIp() { final AzureRegionHelper azureRegionHelper = new AzureRegionHelper(messageHelper); final AzurePolicy policy = new AzurePolicy(); policy.setIpMax(MIN_IP); policy.setIpMin(MAX_IP); assertThrows(IllegalArgumentException.class, () -> azureRegionHelper.validateStoragePolicy(policy)); }
@Test public void shouldThrowIfAzurePolicyIsEmpty() { final AzureRegionHelper azureRegionHelper = new AzureRegionHelper(messageHelper); final AzurePolicy policy = new AzurePolicy(); policy.setIpMax(MAX_IP); assertThrows(IllegalArgumentException.class, () -> azureRegionHelper.validateStoragePolicy(policy)); }