### Question:
InvalidCharactersFilter implements SearchRequestFilter { @Override public String filter(String searchText) { return searchText.replaceAll("[^А-Яа-яёЁA-Za-z0-9ЇїЄєҐґÑñÁáÉéÍíÓóÚúіІ]", " ").trim(); }  @Override String filter(String searchText);  }### Answer:
@Test public void testRemovePunctuationMarks() { String searchText = "φ@#nice-book.!Ω"; String expectedResult = "nice book"; String filterResult = filter.filter(searchText); Assert.assertEquals(filterResult, expectedResult, "Punctuation marks aren't removed."); }
@Test public void testFilterCorrectSearchText() { String searchText = "nice book"; String filterResult = filter.filter(searchText); Assert.assertEquals(filterResult, filterResult, "The search text should remain the same."); }