public void test1() throws Exception {
Map<String, GridServiceDescription> coreServicesMap = new HashMap<String, GridServiceDescription>();//Hazelcast.newHazelcastInstance( null ).getMap( CoreServicesLookup.class.getName() );
SystemEventListener l = SystemEventListenerFactory.getSystemEventListener();
GridImpl grid1 = new GridImpl( new ConcurrentHashMap<String, Object>() );
GridPeerConfiguration conf = new GridPeerConfiguration();
GridPeerServiceConfiguration coreSeviceConf = new CoreServicesLookupConfiguration( coreServicesMap );
conf.addConfiguration( coreSeviceConf );
MultiplexSocketServiceCongifuration socketConf = new MultiplexSocketServiceCongifuration( new MultiplexSocketServerImpl( "127.0.0.1",
new MinaAcceptorFactoryService(),
l,
grid1) );
conf.addConfiguration( socketConf );
WhitePagesLocalConfiguration wplConf = new WhitePagesLocalConfiguration();
conf.addConfiguration( wplConf );
socketConf.addService( WhitePages.class.getName(), wplConf.getWhitePages(), 5012 );
conf.configure( grid1 );
GridImpl grid2 = new GridImpl( new ConcurrentHashMap<String, Object>() );
conf = new GridPeerConfiguration();
//coreServicesMap = Hazelcast.newHazelcastInstance( null ).getMap( CoreServicesLookup.class.getName() );
coreSeviceConf = new CoreServicesLookupConfiguration( coreServicesMap );
conf.addConfiguration( coreSeviceConf );
GridPeerServiceConfiguration wprConf = new WhitePagesRemoteConfiguration( );
conf.addConfiguration( wprConf );
conf.configure( grid2 );
WhitePages wpClient = grid2.get( WhitePages.class );
GridServiceDescription test1Gsd = wpClient.create( "test:string@domain1" );
GridServiceDescription testGsd_2 = wpClient.lookup( "test:string@domain1" );
assertEquals( test1Gsd,