code: public static <T> T getRandomSelection(T... options) {
          if (options == null || options.length == 0) {
              if (tc.isDebugEnabled()) {
                  Tr.debug(tc, "No options provided to random selection, returning null");
              }
              return null;
          }
          if (options.length == 1) {
              if (tc.isDebugEnabled()) {
                  Tr.debug(tc, "Only one option provided to random selection, returning it: [" + options[0] + "]");
              }
              return options[0];
          }
  
          Random rand = new Random();
          Integer index = rand.nextInt(options.length);
  
          T entry = options[index];
          if (tc.isDebugEnabled()) {
              Tr.debug(tc, "Chose random selection: [" + ((entry == null) ? null : entry) + "]");
          }
          return entry;
      }
docs: Randomly chooses and returns one of the provided options.
  
  @param options
  @return