code: public void setAnnotator(@NonNull AnnotationType annotationType, @NonNull Language language, @NonNull Annotator annotator) {
        Preconditions.checkArgument(annotator.satisfies().contains(annotationType),
                                    "Attempting to register " + annotator.getClass()
                                                                         .getName() + " for " + annotationType.name() + " which it does not provide");
        cache.put(createKey(annotationType, language), annotator);
  
        if (language == Language.UNKNOWN) {
           Config.setProperty("Annotator" + annotationType.name() + ".annotator", "CACHED");
        } else {
           Config.setProperty("Annotator" + annotationType.name() + ".annotator." + language, "CACHED");
        }
  
        assert cache.containsKey(createKey(annotationType, language));
     }
docs: Manually caches an annotator for an annotation type / language pair. Note that this will not be safe in a
  distributed environment like Spark or Map Reduce, but is useful for testing annotators.
  
  @param annotationType the annotation type
  @param language       the language
  @param annotator      the annotator