### Question:
SizeSelectors { public static SelectorFunction<Collection<Size>, Size> smallestSize() { return new SelectorFunction<Collection<Size>, Size>() { @Override public Size select(Collection<Size> items) { if (items.isEmpty()) { return null; } return Collections.min(items, COMPARATOR_BY_AREA); } }; }  static SelectorFunction<Collection<Size>, Size> biggestSize(); static SelectorFunction<Collection<Size>, Size> smallestSize();  }### Answer:
@Test public void smallestSize() throws Exception { List<Size> availableSizes = asList( new Size(4032, 3024), new Size(7680, 4320), new Size(1280, 720) ); Size result = SizeSelectors .smallestSize() .select(availableSizes); assertEquals( new Size(1280, 720), result ); }
@Test public void smallestSize_EmptyList() throws Exception { Size result = SizeSelectors .smallestSize() .select(Collections.<Size>emptyList()); assertNull(result); }