### Question:
FileResourceGroupConfigurationManager extends AbstractResourceConfigurationManager { @VisibleForTesting static ManagerSpec parseManagerSpec(FileResourceGroupConfig config) { requireNonNull(config, "config is null"); ManagerSpec managerSpec; try { managerSpec = CODEC.fromJson(Files.readAllBytes(Paths.get(config.getConfigFile()))); } catch (IOException e) { throw new UncheckedIOException(e); } catch (IllegalArgumentException e) { Throwable cause = e.getCause(); if (cause instanceof UnrecognizedPropertyException) { UnrecognizedPropertyException ex = (UnrecognizedPropertyException) cause; String message = format("Unknown property at line %s:%s: %s", ex.getLocation().getLineNr(), ex.getLocation().getColumnNr(), ex.getPropertyName()); throw new IllegalArgumentException(message, e); } if (cause instanceof JsonMappingException) { if (cause.getCause() != null) { cause = cause.getCause(); } throw new IllegalArgumentException(cause.getMessage(), e); } throw e; } return managerSpec; } @Inject  FileResourceGroupConfigurationManager(ClusterMemoryPoolManager memoryPoolManager, FileResourceGroupConfig config); @VisibleForTesting  FileResourceGroupConfigurationManager(ClusterMemoryPoolManager memoryPoolManager, ManagerSpec managerSpec); @Override void configure(ResourceGroup group, SelectionContext<ResourceGroupIdTemplate> context); @Override Optional<SelectionContext<ResourceGroupIdTemplate>> match(SelectionCriteria criteria);  }### Answer:
@Test public void testUserGroupsConfiguration() { ManagerSpec spec = parseManagerSpec("resource_groups_config_user_groups.json"); assertThat(spec.getSelectors() .stream() .map(SelectorSpec::getUserGroupRegex) .map(pattern -> pattern.map(Pattern::pattern))) .containsOnly(Optional.of("groupA")); }