### Question:
RadiusRequest { public String getUsername() { if (Strings.isNullOrEmpty(userName)) { UserNameAttribute userNameAttribute = (UserNameAttribute) attributeMap.get(UserNameAttribute.class); if (userNameAttribute != null) { this.userName = userNameAttribute.getName(); } } return userName; } RadiusRequest(Packet requestPacket); Packet getRequestPacket(); Attribute getAttribute(Class attributeType); String getUsername(); synchronized String getRequestId(); long getStartTimestampInMillis(); void setContextHolderKey(String cacheKey); String getContextHolderKey();  }### Answer:
@Test public void getUsername() { String userName = "testUser"; AccessRequest packet = new AccessRequest((short) 1, mock(Authenticator.class)); UserNameAttribute userNameAttribute = new UserNameAttribute(userName); packet.addAttribute(userNameAttribute); RadiusRequest request = new RadiusRequest(packet); String returnedUserName = request.getUsername(); assertThat(returnedUserName).isEqualTo(userName); }