@Test(groups = "unit")
public void getPrimaryUri() throws Exception {

    RxDocumentServiceRequest request = Mockito.mock(RxDocumentServiceRequest.class);
    Mockito.doReturn(null).when(request).getDefaultReplicaIndex();
    List<AddressInformation>  replicaAddresses = new ArrayList<>();
    replicaAddresses.add(new AddressInformation(true, false, "https://cosmos1", Protocol.Https));
    replicaAddresses.add(new AddressInformation(true, true, "https://cosmos2", Protocol.Https));
    replicaAddresses.add(new AddressInformation(true, false, "https://cosmos3", Protocol.Https));
    Uri res = AddressSelector.getPrimaryUri(request, replicaAddresses);
    assertThat(res).isEqualTo(Uri.create("https://cosmos2/"));
}