AuthenticationToken extends AuthToken { public boolean isExpired() { return super.isExpired(); } private  AuthenticationToken(); private  AuthenticationToken(AuthToken token);  AuthenticationToken(String userName, String principal, String type); void setExpires(long expires); boolean isExpired(); static AuthenticationToken parse(String tokenStr); static final AuthenticationToken ANONYMOUS; }
@Test public void testAnonymous() { Assert.assertNotNull(AuthenticationToken.ANONYMOUS); Assert.assertEquals(null, AuthenticationToken.ANONYMOUS.getUserName()); Assert.assertEquals(null, AuthenticationToken.ANONYMOUS.getName()); Assert.assertEquals(null, AuthenticationToken.ANONYMOUS.getType()); Assert.assertEquals(-1, AuthenticationToken.ANONYMOUS.getExpires()); Assert.assertFalse(AuthenticationToken.ANONYMOUS.isExpired()); }