### Question:
InstanceSelector { @SuppressWarnings( "unchecked" ) <R,E extends Exception> Iterable<R> transform( ThrowingFunction<T,R,E> converter ) throws E { List<R> result = new ArrayList<>(); for ( IndexSlot slot : IndexSlot.values() ) { result.add( converter.apply( select( slot ) ) ); } return result; } InstanceSelector();   InstanceSelector( EnumMap<IndexSlot,T> map ); @Override String toString();  }### Answer:
@Test public void shouldThrowOnNonInstantiatedFlatMap() { InstanceSelector<String> selector = selector( NUMBER, "0" ); try { selector.transform( Integer::parseInt ); fail( "Should have failed" ); } catch ( IllegalStateException e ) { } }