The test DefaultElasticsearchClientFactoryTest.multipleHosts_failover_fault simulates a malformed HTTP response and tests that the failover works correctly in that case. The fault is probably generated randomly, because the tests seem to fail randomly... => I checked, and it's not generated randomly...