### Question:
ReflectionHelper { public static void setInputStreams(Component component, Map<String, Stream> inputStreams) { for (Entry<String, Stream> entry : inputStreams.entrySet()) { setInputStream(component, entry.getKey(), entry.getValue()); } }  @SuppressWarnings("unchecked") static Map<String, Stream> getOutputStreams(Component component); @SuppressWarnings("unchecked") static Stream getOutputStream(Object obj, String name); @SuppressWarnings("unchecked") static List<String> getInputStreamNames(Class<? extends Component> componentClazz); static void setProperties(Object obj, List<PropertyConfiguration> properties); static void setInputStreams(Component component, Map<String, Stream> inputStreams); @SuppressWarnings("unchecked") static void setTopology(Component component, TridentTopology topology); @SuppressWarnings("unchecked") static void setConfiguration(Component component, Config config); @SuppressWarnings("unchecked") static void setFeaturesMapper(Component component, String streamName, NamedFeaturesMapper mapper); @SuppressWarnings("unchecked") static void setFeaturesMapper(Component component, String streamName, ListedFeaturesMapper mapper); @SuppressWarnings("unchecked") static void setStateFactory(Component component, String stateName, StateFactory stateFactory); @SuppressWarnings("unchecked") static void setInputStream(Component component, String name, Stream stream); @SuppressWarnings("unchecked") static NameMapper getNameMapper(Class<?> clazz, String stream); @SuppressWarnings("unchecked") static ListMapper getListMapper(Class<?> clazz, String stream); @SuppressWarnings({ "unchecked", "rawtypes" }) static Object getEnumValue(Class<?> clazz, String name);  }### Answer:
@Test public void should_set_input_streams() { class TestComponent implements Component { @InputStream(name = "in1") public Stream test; @InputStream(name = "in2") public Stream words; @Override public void init() { } } TestComponent component = new TestComponent(); Stream testStream = mock(Stream.class); Stream wordsStream = mock(Stream.class); Map<String, Stream> inputStreams = new HashMap<>(); inputStreams.put("in1", testStream); inputStreams.put("in2", wordsStream); ReflectionHelper.setInputStreams(component, inputStreams); assertThat(component.test).isSameAs(testStream); assertThat(component.words).isSameAs(wordsStream); }