### Question:
PomConverter implements Converter<Pom> { public Pom convertFromText(final String value, final Class<?> targetType, final String optionContext) { final String moduleName; Pom result; ModuleFeatureName moduleFeatureName = null; if (optionContext != null) { final Matcher matcher = pattern.matcher(optionContext); if (matcher.find()) { moduleFeatureName = ModuleFeatureName.valueOf(matcher.group(1)); } } if (LAST_USED_INDICATOR.equals(value)) { result = lastUsed.getModule(); if (result == null) { throw new IllegalStateException( "Unknown pom; please indicate the module as a command option (ie --xxxx)"); } } else if (FOCUSED_INDICATOR.equals(value)) { result = projectOperations.getFocusedModule(); if (moduleFeatureName != null && !typeLocationService.hasModuleFeature(result, moduleFeatureName)) { List<Pom> modules = (List<Pom>) typeLocationService.getModules(moduleFeatureName); if (modules.size() == 0) { throw new RuntimeException(String.format("ERROR: Not exists a module with %s feature", moduleFeatureName)); } else { result = modules.get(0); } } } else { if (ROOT_MODULE_SYMBOL.equals(value)) { moduleName = ""; } else { moduleName = value; } result = projectOperations.getPomFromModuleName(moduleName); Validate.notNull(result, String.format("Module %s not found", moduleName)); } if (moduleFeatureName != null && !typeLocationService.hasModuleFeature(result, moduleFeatureName)) { return null; } if (StringUtils.contains(optionContext, UPDATE) || StringUtils.contains(optionContext, UPDATELAST)) { lastUsed.setTypeNotVerified(null, result); } return result; }  Pom convertFromText(final String value, final Class<?> targetType,
      final String optionContext); boolean getAllPossibleValues(final List<Completion> completions,
      final Class<?> targetType, final String existingData, final String optionContext,
      final MethodTarget target); boolean supports(final Class<?> type, final String optionContext);  }### Answer:
@Test public void testConvertOtherModuleName() { final Pom mockPom = mock(Pom.class); final String moduleName = "foo" + File.separator + "bar"; when(mockProjectOperations.getPomFromModuleName(moduleName)).thenReturn(mockPom); assertEquals(mockPom, converter.convertFromText(moduleName, null, null)); }
@Test public void testConvertRootModuleSymbol() { final Pom mockRootPom = mock(Pom.class); when(mockProjectOperations.getPomFromModuleName("")).thenReturn(mockRootPom); assertEquals(mockRootPom, converter.convertFromText(ROOT_MODULE_SYMBOL, null, null)); }