ApiAuthAnnotationConfig { public void setBlockedRegionsIfNotEmpty(String[] blockedRegions) { if (blockedRegions != null && blockedRegions.length > 0) { config.setBlockedRegions(Arrays.asList(blockedRegions)); } } ApiAuthAnnotationConfig(ApiAuthConfig config); ApiAuthConfig getConfig(); void setAllowCookieAuthIfSpecified(AnnotationBoolean allowCookieAuth); void setBlockedRegionsIfNotEmpty(String[] blockedRegions);  }
@Test public void testSetBlockedRegionsIfNotEmpty() { String[] regions = { "foo", "bar" }; annotationConfig.setBlockedRegionsIfNotEmpty(regions); assertEquals(Arrays.asList(regions), config.getBlockedRegions()); }
@Test public void testSetBlockedRegionsIfNotEmpty_empty() { String[] regions = {}; annotationConfig.setBlockedRegionsIfNotEmpty(regions); testDefaultConfig(); }