use of com.rebuild.core.privileges.bizz.User in project rebuild by getrebuild.
the class DistributedSupportTest method testMap.
@Test
void testMap() {
DistributedSupport distributedSupport = (DistributedSupport) Application.getContext().getBean("DistributedSupport");
ConcurrentMap<String, User> users = distributedSupport.getMap("RB_USER");
users.put("User1", Application.getUserStore().getUser(UserService.SYSTEM_USER));
User fromCache = users.get("User1");
Assertions.assertEquals(fromCache, Application.getUserStore().getUser(UserService.SYSTEM_USER));
Assertions.assertTrue(users.containsKey("User1"));
Assertions.assertFalse(users.containsKey("User2"));
Assertions.assertEquals(1, users.size());
users.remove("User1");
Assertions.assertTrue(users.isEmpty());
}
Aggregations