Search in sources :

Example 1 with Action

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();
}
Also used : Action(com.iplanet.services.naming.ServiceListeners.Action) SessionInfo(com.iplanet.dpro.session.share.SessionInfo) Test(org.testng.annotations.Test)

Aggregations

SessionInfo (com.iplanet.dpro.session.share.SessionInfo)1 Action (com.iplanet.services.naming.ServiceListeners.Action)1 Test (org.testng.annotations.Test)1