private ProfileSelector createMockProfileSelector( Profile profile )
{
MockControl selectorControl = MockControl.createControl( ProfileSelector.class );
ProfileSelector selector = (ProfileSelector) selectorControl.getMock();
selector.selectProfile( new ArrayList<Profile>(), ((ORB) orb).getClientConnectionManager() );
selectorControl.setReturnValue( profile );
selectorControl.replay();
return selector;
}