code: protected Session.StatusCallback createLoginCallback(final AuthProviderListener listener) {
  
  		return new Session.StatusCallback() {
  
  			// callback when session changes state
  			@Override
  			public void call(final Session session, SessionState state, Exception exception) {
  
  				if(exception != null && exception instanceof FacebookOperationCanceledException) {
  					if(logger != null) {
  						logger.error("Facebook operation failed", exception);
  					}
  					handleCancel(listener);
  					return;
  				}
  
  				switch(state) {
  
  					case OPENED:
  						if (isSessionOpen(session)) {
  							// make request to the /me API
  							getUser(session, listener);
  						}
  
  						break;
  
  					case CLOSED:
  						if(exception != null) {
  							handleError(exception, listener);
  						}
  						break;
  
  					case CLOSED_LOGIN_FAILED:
  						if(exception != null) {
  							handleAuthFail(exception, listener);
  						}
  						break;
  				}
  			}
  		};
  	}
docs: So we can mock