docs: public InternalAgendaGroup getNextFocus() {
          if (focusStack.isEmpty()) {
              return null;
          }
          
          InternalAgendaGroup agendaGroup;
          // Iterate until we find a populate AgendaModule or we reach the MAIN,
          // default, AgendaGroup
          while ( true ) {
              agendaGroup = (InternalAgendaGroup) this.focusStack.getLast();
  
              if ( !agendaGroup.isAutoDeactivate() ) {
                  // does not automatically pop, when empty, so always return, even if empty
                  break;
              }
  
              final boolean empty = agendaGroup.isEmpty();
  
              // No populated queues found so pop the focusStack and repeat
              if ( empty && (this.focusStack.size() > 1) ) {
                  agendaGroup.setActive( false );
                  removeLast();
  
                  if ( agendaGroup.isAutoDeactivate() && !agendaGroup.getNodeInstances().isEmpty() ) {
                      this.workingMemory.getAgendaEventSupport().fireBeforeRuleFlowGroupDeactivated( (InternalRuleFlowGroup) agendaGroup,
                              this.workingMemory );
  
                      innerDeactiveRuleFlowGroup((InternalRuleFlowGroup) agendaGroup);
  
                      this.workingMemory.getAgendaEventSupport().fireAfterRuleFlowGroupDeactivated(( InternalRuleFlowGroup) agendaGroup,
                              this.workingMemory);
                  }
                  final EventSupport eventsupport = this.workingMemory;
                  eventsupport.getAgendaEventSupport().fireAgendaGroupPopped( agendaGroup,
                                                                              this.workingMemory );
              } else {
                  agendaGroup = (empty) ? null : agendaGroup;
                  break;
              }
          }
  
          if ( agendaGroup != null &&  !agendaGroup.isActive() ) {
                  // only update recency, if not already active. It may be active already if the use called setFocus
                  agendaGroup.setActivatedForRecency( this.workingMemory.getFactHandleFactory().getRecency() );
                  agendaGroup.setActive( true );
          }
          return agendaGroup;
      }