@Test
public void testAttributeReplaced() {

  HttpSessionAttributeListener listener = mock(HttpSessionAttributeListener.class);
  notifier.attributeReplaced(session, "Test", "very-old-value");
  verify(listener, never()).attributeReplaced(any(HttpSessionBindingEvent.class));
  descriptor.addHttpSessionAttributeListener(listener);
  notifier.attributeReplaced(session, "Test", "old-value");
  verify(listener).attributeReplaced(any(HttpSessionBindingEvent.class));
  HttpSessionBindingListener bindingListener = mock(HttpSessionBindingListener.class);
  notifier.attributeReplaced(session, "Test", bindingListener);
  verify(listener, times(2)).attributeReplaced(any(HttpSessionBindingEvent.class));
  verify(bindingListener).valueUnbound(any(HttpSessionBindingEvent.class));
}