### Question:
DefaultPomEditor implements PomEditor { public PomPlaceHolder readSingle(Path pom) { PomPlaceHolder holder = new PomPlaceHolder(); try { Model model = reader.read(new ByteArrayInputStream(Files.readAllBytes(pom))); holder = new PomPlaceHolder(pom.toAbsolutePath().toString(), model.getArtifactId(), model.getGroupId(), model.getVersion(), model.getPackaging()); } catch (Exception e) { logger.error(e.getMessage()); } return holder; } DefaultPomEditor(Set<PomPlaceHolder> history,
                            ConfigurationProvider config); Set<PomPlaceHolder> getHistory(); @Override Boolean cleanHistory(); PomPlaceHolder readSingle(Path pom); boolean write(Path pom,
                         CompilationRequest request); final String POM; final String TRUE; final String POM_NAME; final String KJAR_EXT; }### Answer:
@Test public void readSingleTest() { assertThat(editor.getHistory()).isEmpty(); PomPlaceHolder placeholder = editor.readSingle(Paths.get(tmpRoot.toAbsolutePath() + "/dummy/pom.xml")); SoftAssertions.assertSoftly(softly -> { softly.assertThat(placeholder.isValid()).isTrue(); softly.assertThat(placeholder.getVersion()).isEqualTo("1.0.0.Final"); softly.assertThat(placeholder.getPackaging()).isEqualTo(("kjar")); softly.assertThat(placeholder.getGroupID()).isEqualTo("org.kie"); softly.assertThat(placeholder.getArtifactID()).isEqualTo("kie-maven-plugin-test-kjar-2"); }); }