@Test
public void differentObjectsForDifferentThreads() throws InterruptedException {

  Configuration mockConfiguration = Mockito.mock(Configuration.class);
  RestClientManager clientManager = new RestClientManager(mockConfiguration);
  final Client client = clientManager.getClient(null);
  final StringBuilder result= new StringBuilder();
  Thread t1 = new Thread(()-> {Client client1 =clientManager.getClient(null);
  if(client1!=client) {
    result.append("different");
  }
  } );
  t1.start();
  t1.join();
  Assert.assertEquals(result.toString(),"different");
}