### Question:
InstanceSelector { <R,E extends Exception> EnumMap<IndexSlot,R> map( ThrowingFunction<T,R,E> converter ) throws E { EnumMap<IndexSlot,R> result = new EnumMap<>( IndexSlot.class ); for ( IndexSlot slot : IndexSlot.values() ) { result.put( slot, converter.apply( select( slot ) ) ); } return result; } InstanceSelector();   InstanceSelector( EnumMap<IndexSlot,T> map ); @Override String toString();  }### Answer:
@Test public void shouldThrowOnNonInstantiatedMap() { InstanceSelector<String> selector = selector( NUMBER, "0" ); try { selector.map( Integer::parseInt ); fail( "Should have failed" ); } catch ( IllegalStateException e ) { } }
@Test public void shouldMap() { InstanceSelector<String> selector = selectorFilledWithOrdinal(); EnumMap<IndexSlot,Integer> actual = selector.map( Integer::parseInt ); for ( IndexSlot slot : IndexSlot.values() ) { assertEquals( slot.ordinal(), actual.get( slot ).intValue() ); } }