If you are testing using JUnit and that is the only thing you are testing you could make the test expect an exception using
@Test (expected=NoSuchElementException.class)
public void someTest() {
driver.findElement(By.className("commentEdit"));
}
Or you could use the findElements method that returns a list of elements or an empty list if none are found (does not throw NoSuchElementException):
List<WebElement> deleteLinks = driver.findElements(By.className("commentEdit"));
assertTrue(deleteLinks.isEmpty());
or
assertTrue(driver.findElements(By.className("commentEdit")).isEmpty());