use of org.simbasecurity.common.event.SimbaEvent in project simba-os by cegeka.
the class RefreshCacheEventListenerTest method onMessage_UserAuthorizationChanged.
@Test
public void onMessage_UserAuthorizationChanged() throws Exception {
SimbaEvent event = new SimbaEvent(SimbaEventType.USER_AUTHORIZATION_CHANGED, USERNAME);
ObjectMessage message = mock(ObjectMessage.class);
when(message.getObject()).thenReturn(event);
listener.onMessage(message);
verify(service).invalidate(USERNAME);
}
use of org.simbasecurity.common.event.SimbaEvent in project simba-os by cegeka.
the class RefreshCacheEventListenerTest method onMessage_AuthorizationChanged.
@Test
public void onMessage_AuthorizationChanged() throws Exception {
SimbaEvent event = new SimbaEvent(SimbaEventType.AUTHORIZATION_CHANGED, null);
ObjectMessage message = mock(ObjectMessage.class);
when(message.getObject()).thenReturn(event);
listener.onMessage(message);
verify(service).invalidate();
}
Aggregations