HTMLParser { public String cleanNameVacancy(String name) { return name.replace("[new]","").trim(); } HTMLParser(DBManager storage); Document getHtmlPage(String url); Elements getTableHtml(Document document); Elements getRowTable(Elements elements); boolean checkVacancy(String textVacancy); void addVacancy(String linkVacancy, String nameVacancy, String author, String linkAuthor, int ask, int view, long timeUpdate); long convertation(String time); String cleanNameVacancy(String name); long parseElementToVacancy(Elements column); long mainLoop();  }
@Test public void whenNameVacancyHavenewThatDeleteIt() throws Exception { Properties properties = new Properties(); try (FileInputStream fileInputStream = new FileInputStream(this.getClass().getClassLoader().getResource("vacancy.properties").getPath())) { properties.load(fileInputStream); } catch (FileNotFoundException e) { } catch (IOException e) { } HTMLParser parser = new HTMLParser(new DBManager(properties)); String control = parser.cleanNameVacancy("Срочно! java dev, 100-150к [new]"); System.out.println(control); }