@SuppressWarnings("unchecked")
@Test
public void testOpenSink() throws Exception {

	final StormConfig stormConfig = new StormConfig();
	final Configuration flinkConfig = new Configuration();
	final ExecutionConfig taskConfig = mock(ExecutionConfig.class);
	when(taskConfig.getGlobalJobParameters()).thenReturn(null).thenReturn(stormConfig)
	.thenReturn(flinkConfig);
	final StreamingRuntimeContext taskContext = mock(StreamingRuntimeContext.class);
	when(taskContext.getExecutionConfig()).thenReturn(taskConfig);
	when(taskContext.getTaskName()).thenReturn("name");
	when(taskContext.getMetricGroup()).thenReturn(new UnregisteredMetricsGroup());
	final IRichBolt bolt = mock(IRichBolt.class);
	BoltWrapper<Object, Object> wrapper = new BoltWrapper<Object, Object>(bolt);
	wrapper.setup(createMockStreamTask(), new StreamConfig(new Configuration()), mock(Output.class));
	wrapper.open();
	verify(bolt).prepare(any(Map.class), any(TopologyContext.class), isNotNull(OutputCollector.class));
}