### Question:
LensPositionSelectors { public static SelectorFunction<Collection<LensPosition>, LensPosition> external() { return lensPosition(LensPosition.EXTERNAL); }  static SelectorFunction<Collection<LensPosition>, LensPosition> front(); static SelectorFunction<Collection<LensPosition>, LensPosition> back(); static SelectorFunction<Collection<LensPosition>, LensPosition> external(); static SelectorFunction<Collection<LensPosition>, LensPosition> lensPosition(final LensPosition position);  }### Answer:
@Test public void external_Available() throws Exception { List<LensPosition> availablePositions = asList( LensPosition.BACK, LensPosition.FRONT, LensPosition.EXTERNAL ); LensPosition result = LensPositionSelectors .external() .select(availablePositions); assertEquals( LensPosition.EXTERNAL, result ); }
@Test public void external_NotAvailable() throws Exception { List<LensPosition> availablePositions = asList( LensPosition.FRONT, LensPosition.BACK ); LensPosition result = LensPositionSelectors .external() .select(availablePositions); assertNull(result); }