### Question:
AnonymousUser extends JCUser { @Override public String getEmail() { throw new UnsupportedOperationException("Mail is not defined for anonymous user"); } AnonymousUser(); @Override Collection<GrantedAuthority> getAuthorities(); @Override String getEmail(); @Override String getEncodedUsername(); @Override List<Group> getGroups(); @Override long getId(); @Override String getPassword(); @Override String getUsername(); @Override boolean isAnonymous();  }### Answer:
@Test(expectedExceptions=UnsupportedOperationException.class) public void testGetEmail() { user.getEmail(); }