use of org.opendaylight.controller.cluster.messaging.MessageSlicer in project controller by opendaylight.
the class ConnectingClientConnectionTest method setup.
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
doNothing().when(mockCallback).accept(any(MockFailure.class));
ticker = new FakeTicker();
ticker.advance(ThreadLocalRandom.current().nextLong());
doReturn(ticker).when(mockContext).ticker();
final ClientActorConfig mockConfig = AccessClientUtil.newMockClientActorConfig();
doReturn(mockConfig).when(mockContext).config();
doReturn(mock(MessageSlicer.class)).when(mockContext).messageSlicer();
mockActor = TestProbe.apply(actorSystem);
mockBackendInfo = new BackendInfo(mockActor.ref(), 0, ABIVersion.current(), 5);
mockRequest = new MockRequest(mockIdentifier, mockReplyTo);
mockRequest2 = new MockRequest(mockIdentifier, mockReplyTo);
mockResponse = mockRequest.toRequestFailure(mockCause);
mockResponseEnvelope = new FailureEnvelope(mockResponse, 0, 0, 0);
mockCookie = ThreadLocalRandom.current().nextLong();
queue = new ConnectingClientConnection<>(mockContext, mockCookie);
}
Aggregations