}
@Test(expected = IllegalArgumentException.class)
public void testDoInitWithIllegalStartEndPorts() throws Exception {
try {
Cache mockCache = mock(Cache.class, "testDoInitWithIllegalStartEndPorts.Cache");
GatewayReceiverFactory mockGatewayReceiverFactory = mock(GatewayReceiverFactory.class,
"testDoInitWithIllegalStartEndPorts.GatewayReceiverFactory");
when(mockCache.createGatewayReceiverFactory()).thenReturn(mockGatewayReceiverFactory);
GatewayReceiverFactoryBean factoryBean = new GatewayReceiverFactoryBean(mockCache);
factoryBean.setName("testDoInitWithIllegalStartEndPorts");
factoryBean.setStartPort(10240);