Package org.infinispan.client.hotrod.impl.transport.tcp

Examples of org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory


@Test (groups = "unit", testName = "client.hotrod.TransportObjectFactoryTest")
public class TransportObjectFactoryTest {

   public void testValidate() {
      Codec codec = mock(Codec.class);
      TransportObjectFactory objectFactory = new TransportObjectFactory(codec, null,
                                                                        new AtomicInteger(), false);
      doThrow(new TransportException("induced!", null))
            .when(codec).writeHeader(any(Transport.class), any(HeaderParams.class));

      InetSocketAddress address = new InetSocketAddress(123);
      assertFalse("Exception shouldn't be thrown here", objectFactory.validateObject(address, any(TcpTransport.class)));
   }
View Full Code Here

TOP

Related Classes of org.infinispan.client.hotrod.impl.transport.tcp.TransportObjectFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.