DefaultAlertEntityHolder implements AlertEntityHolder { @Override public boolean remove(AlertEntity alertEntity) { return alerts.remove(alertEntity); } DefaultAlertEntityHolder(ALERT_TYPE alertType); @Override ALERT_TYPE getAlertType(); @Override synchronized void hold(AlertEntity alertEntity); @Override boolean remove(AlertEntity alertEntity); @Override synchronized void removeIf(Predicate<AlertEntity> predicate); @Override synchronized boolean hasAlerts(); @Override List<AlertEntity> allAlerts(); @Override String toString();  }
@Test public void remove() { AlertEntity alertEntity = alertEntity(); holder.hold(alertEntity); holder.remove(alertEntity); Assert.assertFalse(holder.hasAlerts()); }