@Test public void testSetIsNewSessionTrue() { ConcurrentHashMap<String, String> map = new ConcurrentHashMap<String, String>(); SessionContext context = new SessionContext(map); context.setIsNewSession(true); assertEquals(context.getIsNewSession(), true); assertEquals(map.size(), 1); assertEquals(Boolean.valueOf(map.get(ContextTagKeys.getKeys().getSessionIsNew())), true); } }
@Test public void testSetIsNewSessionNull() { ConcurrentHashMap<String, String> map = new ConcurrentHashMap<String, String>(); SessionContext context = new SessionContext(map); context.setIsNewSession(null); assertNull(context.getIsNewSession()); assertEquals(map.size(), 0); assertNull(map.get(ContextTagKeys.getKeys().getSessionIsNew())); }