diff --git a/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIT.java b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIT.java index 6558b0831804f..420dc02bd4c24 100644 --- a/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/action/admin/cluster/stats/ClusterStatsIT.java @@ -187,11 +187,7 @@ private void assertShardStats(ClusterStatsIndices.ShardStats stats, int indices, public void testIndicesShardStatsDefault() { internalCluster().startNode(); ensureGreen(); - ClusterStatsResponse response = client().admin() - .cluster() - .prepareClusterStats() - .useOptimizedClusterStatsResponse(false) - .get(); + ClusterStatsResponse response = client().admin().cluster().prepareClusterStats().useOptimizedClusterStatsResponse(false).get(); assertThat(response.getStatus(), Matchers.equalTo(ClusterHealthStatus.GREEN)); prepareCreate("test1").setSettings(Settings.builder().put("number_of_shards", 2).put("number_of_replicas", 1)).get(); @@ -236,11 +232,7 @@ public void testIndicesShardStatsDefault() { public void testIndicesShardStatsOptimised() { internalCluster().startNode(); ensureGreen(); - ClusterStatsResponse response = client().admin() - .cluster() - .prepareClusterStats() - .useOptimizedClusterStatsResponse(true) - .get(); + ClusterStatsResponse response = client().admin().cluster().prepareClusterStats().useOptimizedClusterStatsResponse(true).get(); assertThat(response.getStatus(), Matchers.equalTo(ClusterHealthStatus.GREEN)); prepareCreate("test1").setSettings(Settings.builder().put("number_of_shards", 2).put("number_of_replicas", 1)).get();