// create 2 listeners, veto the event in the first and
// fail if the second receives the event
comment.setPending();
CommentListener listener1 = new CommentListener() {
public void commentAdded(CommentEvent event) {
fail();
}
public void commentRemoved(CommentEvent event) {
fail();
}
public void commentApproved(CommentEvent event) {
event.veto();
}
public void commentRejected(CommentEvent event) {
fail();
}
};
CommentListener listener2 = new CommentListener() {
public void commentAdded(CommentEvent event) {
fail();
}
public void commentRemoved(CommentEvent event) {