### Question:
DocGeneratorUtil { public static String computeExtensionDocFileName(String configRoot) { StringBuilder extensionNameBuilder = new StringBuilder(); final Matcher matcher = Constants.PKG_PATTERN.matcher(configRoot); if (!matcher.find()) { extensionNameBuilder.append(configRoot); } else { String extensionName = matcher.group(1); final String subgroup = matcher.group(2); extensionNameBuilder.append(Constants.QUARKUS); extensionNameBuilder.append(Constants.DASH); if (Constants.DEPLOYMENT.equals(extensionName) || Constants.RUNTIME.equals(extensionName)) { extensionNameBuilder.append(CORE); } else if (subgroup != null && !Constants.DEPLOYMENT.equals(subgroup) && !Constants.RUNTIME.equals(subgroup) && !Constants.COMMON.equals(subgroup) && subgroup.matches(Constants.DIGIT_OR_LOWERCASE)) { extensionNameBuilder.append(extensionName); extensionNameBuilder.append(Constants.DASH); extensionNameBuilder.append(subgroup); final String qualifier = matcher.group(3); if (qualifier != null && !Constants.DEPLOYMENT.equals(qualifier) && !Constants.RUNTIME.equals(qualifier) && !Constants.COMMON.equals(qualifier) && qualifier.matches(Constants.DIGIT_OR_LOWERCASE)) { extensionNameBuilder.append(Constants.DASH); extensionNameBuilder.append(qualifier); } } else { extensionNameBuilder.append(extensionName); } } extensionNameBuilder.append(Constants.ADOC_EXTENSION); return extensionNameBuilder.toString(); }  static String computeExtensionDocFileName(String configRoot); static String computeExtensionGeneralConfigDocFileName(String configRoot); static String computeConfigGroupDocFileName(String configGroupClassName); static String computeConfigRootDocFileName(String configRootClassName, String rootName); static void appendConfigItemsIntoExistingOnes(List<ConfigDocItem> existingConfigItems,
            List<ConfigDocItem> configDocItems); static void sort(List<ConfigDocItem> configDocItems); static final String LEVEL_HACK_URL; }### Answer:
@Test public void shouldReturnConfigRootNameWhenComputingExtensionName() { String configRoot = "org.acme.ConfigRoot"; String expected = "org.acme.ConfigRoot.adoc"; String fileName = computeExtensionDocFileName(configRoot); assertEquals(expected, fileName); }
@Test public void shouldUseCoreForConfigRootsCoreModuleWhenComputingExtensionName() { String configRoot = "io.quarkus.runtime.RuntimeConfig"; String expected = "quarkus-core.adoc"; String fileName = computeExtensionDocFileName(configRoot); assertEquals(expected, fileName); configRoot = "io.quarkus.deployment.BuildTimeConfig"; expected = "quarkus-core.adoc"; fileName = computeExtensionDocFileName(configRoot); assertEquals(expected, fileName); configRoot = "io.quarkus.deployment.path.BuildTimeConfig"; expected = "quarkus-core.adoc"; fileName = computeExtensionDocFileName(configRoot); assertEquals(expected, fileName); }
@Test public void shouldGuessArtifactIdWhenComputingExtensionName() { String configRoot = "io.quarkus.agroal.Config"; String expected = "quarkus-agroal.adoc"; String fileName = computeExtensionDocFileName(configRoot); assertEquals(expected, fileName); configRoot = "io.quarkus.keycloak.Config"; expected = "quarkus-keycloak.adoc"; fileName = computeExtensionDocFileName(configRoot); assertEquals(expected, fileName); configRoot = "io.quarkus.extension.name.BuildTimeConfig"; expected = "quarkus-extension-name.adoc"; fileName = computeExtensionDocFileName(configRoot); assertEquals(expected, fileName); }