code: private static TemporalUnit defaultUnitFor(Temporal temporal) {
          return DEFAULT_UNITS.entrySet()
                  .stream()
                  .filter(e -> e.getKey().isAssignableFrom(temporal.getClass()))
                  .findFirst()
                  .map(Map.Entry::getValue)
                  .orElse(ChronoUnit.SECONDS);
      }
docs: A number of extension methods permit a long or int to be provided as a parameter. This method determines
  what the unit should be for this number.