* @throws NotSignedInException if there is not a signed in user associated with the thread local request.
*/
public UserId getUserInSessionAndEnsureSignedIn() throws NotSignedInException {
UserId userId = getUserInSession();
if (userId.isGuest()) {
throw new NotSignedInException();
} else {
return userId;
}
}