@Test @SuppressWarnings("unchecked") public void testGetConfig() throws URISyntaxException { Mockery context = new Mockery() {{ setImposteriser(ClassImposteriser.INSTANCE); }}; final IoServiceEx service = context.mock(IoServiceEx.class); final IoProcessorEx<SseSession> processor = (IoProcessorEx<SseSession>)context.mock(IoProcessorEx.class); final IoSessionEx parent = context.mock(IoSessionEx.class); final IoBufferAllocatorEx<SseBuffer> allocator = context.mock(IoBufferAllocatorEx.class); final IoHandler handler = context.mock(IoHandler.class); context.checking(new Expectations() { { try { allowing(service).getTransportMetadata(); will(returnValue(new DefaultTransportMetadata(SseProtocol.NAME))); allowing(service).getHandler(); will(returnValue(handler)); allowing(service).getSessionConfig(); will(returnValue(new DefaultSseSessionConfig())); allowing(service).getThreadLocalWriteRequest(with(any(int.class))); will(returnValue(new ShareableWriteRequest())); allowing(parent).getIoLayer(); will(returnValue(0)); allowing(parent).getIoThread(); will(returnValue(currentThread())); allowing(parent).getIoExecutor(); will(returnValue(IMMEDIATE_EXECUTOR)); } catch (Exception e) { throw new RuntimeException(e); } } }); ResourceAddress localAddress = ResourceAddressFactory.newResourceAddressFactory().newResourceAddress("sse: ResourceAddress remoteAddress = ResourceAddressFactory.newResourceAddressFactory().newResourceAddress("sse: SseSession session = new SseSession(service, processor, localAddress, remoteAddress, parent, allocator); session.getConfig(); context.assertIsSatisfied(); }
@Override public SseSessionConfig getConfig() { return (DefaultSseSessionConfig)super.getConfig(); }
SseSession extends AbstractBridgeSession<SseSession, SseBuffer> { @Override public SseSessionConfig getConfig() { return (DefaultSseSessionConfig)super.getConfig(); } }
SseSession extends AbstractBridgeSession<SseSession, SseBuffer> { @Override public SseSessionConfig getConfig() { return (DefaultSseSessionConfig)super.getConfig(); } SseSession(IoServiceEx service, IoProcessorEx<SseSession> processor, ResourceAddress localAddress, ResourceAddress remoteAddress, IoSessionEx parent,
                      IoBufferAllocatorEx<SseBuffer> allocator);  SseSession(int ioLayer,
                      Thread ioThread,
                      Executor ioExecutor,
                      IoServiceEx service,
                      IoProcessorEx<SseSession> processor,
                      ResourceAddress localAddress,
                      ResourceAddress remoteAddress,
                      IoBufferAllocatorEx<SseBuffer> allocator,
                      IoSessionEx parent); }
SseSession extends AbstractBridgeSession<SseSession, SseBuffer> { @Override public SseSessionConfig getConfig() { return (DefaultSseSessionConfig)super.getConfig(); } SseSession(IoServiceEx service, IoProcessorEx<SseSession> processor, ResourceAddress localAddress, ResourceAddress remoteAddress, IoSessionEx parent,
                      IoBufferAllocatorEx<SseBuffer> allocator);  SseSession(int ioLayer,
                      Thread ioThread,
                      Executor ioExecutor,
                      IoServiceEx service,
                      IoProcessorEx<SseSession> processor,
                      ResourceAddress localAddress,
                      ResourceAddress remoteAddress,
                      IoBufferAllocatorEx<SseBuffer> allocator,
                      IoSessionEx parent); @Override CachingMessageEncoder getMessageEncoder(); @Override SseSessionConfig getConfig(); void attach(final IoSessionEx newParent); boolean detach(IoSessionEx oldParent); @Override ResourceAddress getLocalAddress(); @Override ResourceAddress getRemoteAddress(); IoSessionEx parent(); }
SseSession extends AbstractBridgeSession<SseSession, SseBuffer> { @Override public SseSessionConfig getConfig() { return (DefaultSseSessionConfig)super.getConfig(); } SseSession(IoServiceEx service, IoProcessorEx<SseSession> processor, ResourceAddress localAddress, ResourceAddress remoteAddress, IoSessionEx parent,
                      IoBufferAllocatorEx<SseBuffer> allocator);  SseSession(int ioLayer,
                      Thread ioThread,
                      Executor ioExecutor,
                      IoServiceEx service,
                      IoProcessorEx<SseSession> processor,
                      ResourceAddress localAddress,
                      ResourceAddress remoteAddress,
                      IoBufferAllocatorEx<SseBuffer> allocator,
                      IoSessionEx parent); @Override CachingMessageEncoder getMessageEncoder(); @Override SseSessionConfig getConfig(); void attach(final IoSessionEx newParent); boolean detach(IoSessionEx oldParent); @Override ResourceAddress getLocalAddress(); @Override ResourceAddress getRemoteAddress(); IoSessionEx parent();  }