*/
package org.opendaylight.controller.cluster.access.client;
-import static org.mockito.Matchers.any;
+import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.after;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
@Override
protected ReconnectingClientConnection<BackendInfo> createConnection() {
- final BackendInfo backend = new BackendInfo(backendProbe.ref(), 0L, ABIVersion.BORON, 10);
- final ConnectingClientConnection<BackendInfo> connectingConn = new ConnectingClientConnection<>(context, 0L);
+ final BackendInfo backend = new BackendInfo(backendProbe.ref(), "test", 0L, ABIVersion.BORON, 10);
+ final ConnectingClientConnection<BackendInfo> connectingConn = new ConnectingClientConnection<>(context, 0L,
+ backend.getName());
final ConnectedClientConnection<BackendInfo> connectedConn =
new ConnectedClientConnection<>(connectingConn, backend);
return new ReconnectingClientConnection<>(connectedConn, mock(RequestException.class));
final Consumer<Response<?, ?>> callback = mock(Consumer.class);
final Request<?, ?> request = createRequest(replyToProbe.ref());
connection.sendRequest(request, callback);
- backendProbe.expectNoMsg();
+ backendProbe.expectNoMessage();
final LocalHistoryIdentifier historyId = new LocalHistoryIdentifier(CLIENT_ID, 0L);
final RequestSuccess<?, ?> message = new TransactionAbortSuccess(new TransactionIdentifier(historyId, 0L), 0L);
final ResponseEnvelope<?> envelope = new SuccessEnvelope(message, 0L, 0L, 0L);
connection.receiveResponse(envelope);
verify(callback, after(1000).never()).accept(any());
}
-}
\ No newline at end of file
+}