Description
Introduce a new exception called AccountNotFoundException that is a subclass of FailedAuthenticationException when the user cannot be found in CrowdService#authenticate. CrowdService#authenticate will no longer throw the runtime UserNotFoundException.
The reason for this change is that before Crowd 2.2.2, when a user is not found, a FailedAuthenticationException (which is a checked exception) would be thrown - which is the correct behaviour. Since Crowd 2.2.2 however, we throw a UserNotFoundException. The reason for this change is actually due to the fact that we want ApplicationService#authenticate to throw a UserNotFoundException so that we can ignore it and attempt authentication with other directories. We don't want to stop an authentication just because a directory does not contain the user.
The problem with throwing a UserNotFoundException is that every client code calling CrowdService#authenticate will need to now also catch a UserNotFoundException, when they generally don't care.
The above solution allows client code which cares about distinguishing the types of FailedAuthenticationException to do so, which keeping client code minimal.