### Question:
ElasticsearchClientService { public Client getClient() { return client; }  Node createEmbeddedNode(String name, Properties settings); Client getClient(); @PreDestroy void destroy(); void checkHealthOfCluster(Client client);  }### Answer:
@Test public void getClient() { ElasticsearchClientService tested = getTested(); Assert.assertNull(tested.getClient()); tested.client = Mockito.mock(Client.class); Assert.assertNotNull(tested.getClient()); Assert.assertEquals(tested.client, tested.getClient()); }