### Question:
EsClient implements AutoCloseable { public static EsClient from(EsConfig config) { return new EsClient(config); } private  EsClient(EsConfig config); static EsClient from(EsConfig config); Response performGetRequest(String endpoint); Response performPutRequest(String endpoint, Map<String, String> params, HttpEntity body); Response performPostRequest(String endpoint, Map<String, String> params, HttpEntity body); Response performDeleteRequest(String endpoint); @Override @SneakyThrows void close();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void createClientFromEmptyHostsTest() { EsClient.from(EsConfig.from()); }
@Test(expected = NullPointerException.class) public void createClientFromNullConfigTest() { EsClient.from(null); }