### Question:
SearchClientService extends ElasticsearchClientService { @PostConstruct public void init() throws Exception { log = Logger.getLogger(getClass().getName()); settings = SearchUtils.loadProperties(CONFIG_FILE); if (ClientType.EMBEDDED.equals(appConfigurationService.getAppConfiguration().getClientType())) { node = createEmbeddedNode("search", settings); client = node.client(); return; } else { transportSettings = SearchUtils.loadProperties(CONFIG_FILE_TRANSPORT); client = createTransportClient(transportSettings, settings); } checkHealthOfCluster(client); }  @PostConstruct void init(); SearchResponse performFilterByOneField(String indexName, String indexType, String fieldName, String fieldValue); SearchResponse performQueryByOneFieldAnyValue(String indexName, String indexType, String fieldName,
			String sortByField); SearchResponse executeESScrollSearchNextRequest(SearchResponse scrollResp); GetResponse performGet(String indexName, String indexType, String id); void performPutAsync(String indexName, String indexType, String id, Map<String, Object> content); IndexResponse performPut(String indexName, String indexType, Map<String, Object> content); IndexResponse performPut(String indexName, String indexType, String id, Map<String, Object> content); DeleteResponse performDelete(String indexName, String indexType, String id); void performIndexFlushAndRefresh(String... indexName); void performIndexFlushAndRefreshBlocking(String... indexName); void performDeleteOldRecords(String indexName, String indexType, Date timestamp); Properties getSettings(); Properties getTransportSettings(); static final String CONFIG_FILE_TRANSPORT; static final String CONFIG_FILE; }### Answer:
@Test public void init_embedded() throws Exception { AppConfigurationService acs = new AppConfigurationService(); AppConfiguration ac = new AppConfiguration(System.getProperty("java.io.tmpdir")); acs.appConfiguration = ac; ac.setClientType(ClientType.EMBEDDED); ac.setProviderCreateInitData(false); SearchClientService tested = new SearchClientService(); tested.appConfigurationService = acs; tested.log = Logger.getLogger("testlogger"); try { tested.init(); Assert.assertNotNull(tested.node); Assert.assertNotNull(tested.client); } finally { tested.destroy(); Assert.assertNull(tested.node); Assert.assertNull(tested.client); } }