use of org.wildfly.clustering.ee.cache.SimpleManager in project wildfly by wildfly.
the class ConcurrentSessionManagerTestCase method getStopTimeout.
@Test
public void getStopTimeout() {
SessionManager<Void, Batch> manager = mock(SessionManager.class);
SessionManager<Void, Batch> subject = new ConcurrentSessionManager<>(manager, SimpleManager::new);
Duration expected = Duration.ofMinutes(1);
when(manager.getStopTimeout()).thenReturn(expected);
Duration result = subject.getStopTimeout();
assertSame(expected, result);
}
use of org.wildfly.clustering.ee.cache.SimpleManager in project wildfly by wildfly.
the class ConcurrentSessionManagerTestCase method setDefaultMaxInactiveInterval.
@Test
public void setDefaultMaxInactiveInterval() {
SessionManager<Void, Batch> manager = mock(SessionManager.class);
SessionManager<Void, Batch> subject = new ConcurrentSessionManager<>(manager, SimpleManager::new);
Duration value = Duration.ofMinutes(60);
subject.setDefaultMaxInactiveInterval(value);
verify(manager).setDefaultMaxInactiveInterval(value);
}
use of org.wildfly.clustering.ee.cache.SimpleManager in project wildfly by wildfly.
the class ConcurrentSessionManagerTestCase method readSession.
@Test
public void readSession() {
SessionManager<Void, Batch> manager = mock(SessionManager.class);
SessionManager<Void, Batch> subject = new ConcurrentSessionManager<>(manager, SimpleManager::new);
ImmutableSession expected = mock(ImmutableSession.class);
String id = "foo";
when(manager.readSession(id)).thenReturn(expected);
ImmutableSession result = subject.readSession(id);
assertSame(expected, result);
}
use of org.wildfly.clustering.ee.cache.SimpleManager in project wildfly by wildfly.
the class ConcurrentSessionManagerTestCase method getDefaultMaxInactiveInterval.
@Test
public void getDefaultMaxInactiveInterval() {
SessionManager<Void, Batch> manager = mock(SessionManager.class);
SessionManager<Void, Batch> subject = new ConcurrentSessionManager<>(manager, SimpleManager::new);
Duration expected = Duration.ofMinutes(60);
when(manager.getDefaultMaxInactiveInterval()).thenReturn(expected);
Duration result = subject.getDefaultMaxInactiveInterval();
assertSame(expected, result);
}
Aggregations