@Test
public void should_create_jchannel_using_provided_configurator_and_cluster_name() throws Exception {
JGroupsChannelFactoryBean factoryBean = new JGroupsChannelFactoryBean();
ProtocolStackConfigurator protocolStackConfigurator = mock(ProtocolStackConfigurator.class);
List<ProtocolConfiguration> protocols = asList(new ProtocolConfiguration("UDP"));
when(protocolStackConfigurator.getProtocolStack()).thenReturn(protocols);
factoryBean.setProtocolStackConfigurator(protocolStackConfigurator);
factoryBean.setClusterName("cluster");
factoryBean.afterPropertiesSet();