// give it our mock cache manager
//LateralTCPListener listener = (LateralTCPListener)
LateralTCPListener.getInstance( lattr, cacheMgr );
// add the item to the listeners cache
ICacheElement element = new CacheElement( "test", "key", "value1" );
cacheMgr.getCache().update( element );
// setup a service to talk to the listener started above.
TCPLateralCacheAttributes lattr2 = new TCPLateralCacheAttributes();
lattr2.setTcpListenerPort( 1108 );
lattr2.setTcpServer( "localhost:1107" );
LateralTCPService service = new LateralTCPService( lattr2 );
service.setListenerId( 123456 );
SleepUtil.sleepAtLeast( 300 );
// DO WORK
ICacheElement result = service.get( "test", "key" );
System.out.println( "testSendAndReceived, result = " + result );
assertNotNull( "Result should not be null.", result );
assertEquals( "Didn't get the correct object", element.getVal(), result.getVal() );
}