### Question:
TokenUtils { public static Attribute getAttribute(Token token, String attrName) { if (token == null) { throw new NullPointerException("Token can not be null."); } List<Attribute> attributes = token.getAttributes(); if(attributes != null) { for(Attribute attribute : attributes) { if(attribute.getName().equalsIgnoreCase(attrName)) { return attribute; } } } return null; }  static byte[] getBytesOfToken(Token token); static String[] getGroups(Token token); static Attribute getAttribute(Token token, String attrName); static long getRefreshTime(Token token); static boolean isExpired(Token token); static String encodeToken(byte[] token); static byte[] decodeToken(String token); static Token createTokenInstance(String tokenName, long id, 
      Secrets secrets, String issuer, String user, long issueInstant, 
      long notBefore, long notOnOrAfter, boolean encrypted); static T newInstance(Class<T> theClass, long id, 
      Secrets secrets, String issuer, String user, long issueInstant, 
      long notBefore, long notOnOrAfter, boolean encrypted);  }### Answer:
@Test public void testGetAttribute() throws Exception { Token identityToken = createToken(null, identityTokenName); Attribute attr = TokenUtils.getAttribute(identityToken, ATTRIBUTE_TYPE.GROUP.getName()); System.out.println(attr.getName()); attr = TokenUtils.getAttribute(identityToken, ATTRIBUTE_TYPE.AGE.getName()); System.out.println(attr.getName()); }