docs: private static <T> T extractSingleton(Collection<T> collection) {
  		if (collection == null || collection.isEmpty()) {
  			return null;
  		}
  
  		if (collection.size() == 1) {
  			return collection.iterator().next();
  		} else {
  			throw new IllegalStateException("Expected singleton collection, but found size: " + collection.size());
  		}
  	}