docs: protected State calculateTargetState(RepositoryResourceImpl matchingResource) {
          State targetState = _desiredStateIfNoMatchingFound;
          if (matchingResource != null) {
              if (_desiredStateIfMatchingFound == null) {
                  targetState = matchingResource.getState();
              } else {
                  targetState = _desiredStateIfMatchingFound;
              }
          }
  
          return targetState;
      }