private static final int MAX = 40010;
@Override
protected SocketFactory newObjectUnderTest() throws ConfigurationException
{
final PortRangeSocketFactory factory = new PortRangeSocketFactory();
MockControl configControl = MockControl.createControl(Configuration.class);
Configuration configMock = (Configuration) configControl.getMock();
configControl.expectAndReturn(configMock.getLogger("org.jacorb.orb.socketfactory"), TestUtils.getLogger());
configControl.expectAndReturn(configMock.getAttributeAsInteger(PortRangeSocketFactory.MIN_PROP), MIN);
configControl.expectAndReturn(configMock.getAttributeAsInteger(PortRangeSocketFactory.MAX_PROP), MAX);
configControl.expectAndReturn(configMock.getAttribute("OAIAddr", ""), "");
configControl.replay();
factory.configure(configMock);
return factory;
}