### Question:
Utils { @SuppressWarnings("PMD.UnusedLocalVariable") public static <T> int size(Iterable<T> iter) { if (iter instanceof TagList) { return ((TagList) iter).size(); } else if (iter instanceof Collection<?>) { return ((Collection<?>) iter).size(); } else { int size = 0; for (T v : iter) { ++size; } return size; } } private  Utils(); static Id normalize(Id id); static String getTagValue(Id id, String k); static String getTagValue(Iterable<Tag> tags, String k); static T getValue(Iterable<T> values, int pos); static Measurement first(Iterable<Measurement> ms, Tag t); static Measurement first(final Iterable<Measurement> ms, final String k, final String v); static Measurement first(Iterable<Measurement> ms, Predicate<Measurement> p); static Iterable<Measurement> filter(Iterable<Measurement> ms, Tag t); static Iterable<Measurement> filter(
      final Iterable<Measurement> ms, final String k, final String v); static Iterable<Measurement> filter(
      final Iterable<Measurement> ms, final Predicate<Measurement> p); static List<T> toList(Iterable<T> iter); static List<T> toList(Iterator<T> iter); @SuppressWarnings("PMD.UnusedLocalVariable") static int size(Iterable<T> iter); static V computeIfAbsent(ConcurrentMap<K, V> map, K k, Function<K, V> f); static void propagateTypeError(
      Registry registry, Id id, Class<?> desiredClass, Class<?> actualClass);  }### Answer:
@Test public void sizeTagList() { Id id = Id.create("test").withTags("a", "1", "b", "2"); Assertions.assertEquals(2, Utils.size(id.tags())); }
@Test public void sizeCollection() { List<String> vs = new ArrayList<>(); vs.add("a"); vs.add("b"); vs.add("c"); Assertions.assertEquals(3, Utils.size(vs)); }
@Test public void sizeIterable() { List<String> vs = new ArrayList<>(); vs.add("a"); vs.add("b"); Assertions.assertEquals(2, Utils.size(vs::iterator)); }