use of com.couchbase.client.dcp.Client.Builder in project components by Talend.
the class CouchbaseStreamingConnectionTest method setup.
@Before
public void setup() {
PowerMockito.mockStatic(Client.class);
Builder builder = Mockito.mock(Builder.class);
Mockito.when(builder.connectTimeout(Mockito.anyLong())).thenReturn(builder);
Mockito.when(builder.hostnames(Mockito.anyString())).thenReturn(builder);
Mockito.when(builder.bucket(Mockito.anyString())).thenReturn(builder);
Mockito.when(builder.password(Mockito.anyString())).thenReturn(builder);
Mockito.when(builder.controlParam(Mockito.any(Names.class), Mockito.any())).thenReturn(builder);
Mockito.when(builder.bufferAckWatermark(Mockito.anyInt())).thenReturn(builder);
client = Mockito.mock(Client.class);
PowerMockito.when(Client.configure()).thenReturn(builder);
Mockito.when(builder.build()).thenReturn(client);
streamingConnection = new CouchbaseStreamingConnection("localhost", "", "testPassword");
}