### Question:
KieResourceResolver extends ResourceResolver<KieModule> { @Override protected KieModule makeModule(final org.uberfire.java.nio.file.Path nioModuleRootPath) { try { final KieModule module = simpleModuleInstance(nioModuleRootPath); final POM pom = pomService.load(module.getPomXMLPath()); module.setPom(pom); return module; } catch (final Exception e) { return null; } } KieResourceResolver(); @Inject  KieResourceResolver(final @Named("ioStrategy") IOService ioService,
                               final POMService pomService,
                               final CommentedOptionFactory commentedOptionFactory,
                               final KModuleService kModuleService,
                               final Instance<ModuleResourcePathResolver> resourcePathResolversInstance); @Override KieModule resolveModule(Path resource, boolean loadPOM); @Override org.guvnor.common.services.project.model.Package resolvePackage(final Path resource); @Override KieModule simpleModuleInstance(final org.uberfire.java.nio.file.Path nioModuleRootPath);  }### Answer:
@Test public void returnModule() throws Exception { doReturn(new POM()).when(pomService).load(pathArgumentCaptor.capture()); assertNotNull(resolver.makeModule(Paths.convert(PathFactory.newPath("testFile", "file: final String pathThatWasUsedToLoadTheModulePomXml = pathArgumentCaptor.getValue().toURI(); assertThat(pathThatWasUsedToLoadTheModulePomXml).endsWith(": }
@Test public void returnNullWhenSomethingGoesWrong() throws Exception { assertNull(resolver.makeModule(null)); }