use of com.iplanet.services.naming.ServiceListeners.Action in project OpenAM by OpenRock.
the class StatelessJWTCacheTest method shouldRespondToServiceListenersNotification.
@Test
public void shouldRespondToServiceListenersNotification() {
given(mockConfig.getJWTCacheSize()).willReturn(1);
cache = new StatelessJWTCache(mockConfig, mockListeners);
SessionInfo mockSessionInfo = mock(SessionInfo.class);
cache.cache(mockSessionInfo, "badger");
// When
for (Action action : actions) {
action.performUpdate();
}
// Then
assertThat(cache.contains(mockSessionInfo)).isFalse();
}
Aggregations