@Test(groups = "unit", expectedExceptions = GoneException.class, expectedExceptionsMessageRegExp =
    "The requested resource is no longer available at the server. Returned addresses are \\{https://cosmos1/,https://cosmos2/\\}")

public void getPrimaryUri_NoPrimaryAddress() 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, false, "https://cosmos2", Protocol.Https));
    AddressSelector.getPrimaryUri(request, replicaAddresses);
}