@Override
protected void configureObjectUnderTest(String name, Configurable configurable) throws Exception
{
MockControl configControl = MockControl
.createControl(Configuration.class);
Configuration configMock = (Configuration) configControl.getMock();
configControl.expectAndReturn(configMock.getLogger("org.jacorb.orb.socketfactory"), TestUtils.getLogger());
if (name.startsWith("testSetLocalhost"))
{
configControl.expectAndReturn(configMock.getAttribute("OAIAddr", ""), "localhost");
}
else if (name.startsWith("testSetHostname"))
{
configControl.expectAndReturn(configMock.getAttribute("OAIAddr", ""), InetAddress.getLocalHost().getCanonicalHostName());
}
else
{
configControl.expectAndReturn(configMock.getAttribute("OAIAddr", ""), "");
}
configControl.replay();
configurable.configure(configMock);