From 3bd2ec918e0c4a3fd6527d452275b16179739434 Mon Sep 17 00:00:00 2001 From: oksanay Date: Mon, 29 Apr 2024 18:09:13 -0700 Subject: [PATCH] Formatting Signed-off-by: oksanay --- .../_types/QueryCacheStatsTest.java | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/java-client/src/test/java/org/opensearch/client/opensearch/_types/QueryCacheStatsTest.java b/java-client/src/test/java/org/opensearch/client/opensearch/_types/QueryCacheStatsTest.java index 9e1d6cd2a8..f7e785cfd2 100644 --- a/java-client/src/test/java/org/opensearch/client/opensearch/_types/QueryCacheStatsTest.java +++ b/java-client/src/test/java/org/opensearch/client/opensearch/_types/QueryCacheStatsTest.java @@ -12,30 +12,30 @@ public class QueryCacheStatsTest { @Test - public void testLongSerailization() { - QueryCacheStats expected = new QueryCacheStats.Builder().cacheCount(8757938874l) - .cacheSize(8757938874l) - .evictions(8757938874l) - .hitCount(8757938874l) - .memorySizeInBytes(8757938874l) - .missCount(8757938874l) - .totalCount(8757938874l) - .build(); - - String jsonString = "{\"cache_count\": 8757938874, \"cache_size\": 8757938874, \"evictions\":" + - " 8757938874, \"hit_count\": 8757938874, \"memory_size_in_bytes\": 8757938874, \"miss_count\":" + - " 8757938874, \"total_count\": 8757938874}"; - - StringReader reader = new StringReader(jsonString); - JacksonJsonpMapper mapper = new JacksonJsonpMapper(); - JsonParser parser = mapper.jsonProvider().createParser(reader); - QueryCacheStats actual = QueryCacheStats._DESERIALIZER.deserialize(parser, mapper); - assertEquals(expected.hitCount(), actual.hitCount()); - assertEquals(expected.memorySizeInBytes(), actual.memorySizeInBytes()); - assertEquals(expected.missCount(), actual.missCount()); - assertEquals(expected.cacheCount(), actual.cacheCount()); - assertEquals(expected.totalCount(), actual.totalCount()); - assertEquals(expected.cacheSize(), actual.cacheSize()); - assertEquals(expected.evictions(), actual.evictions()); - } + public void testLongSerailization() { + QueryCacheStats expected = new QueryCacheStats.Builder().cacheCount(8757938874l) + .cacheSize(8757938874l) + .evictions(8757938874l) + .hitCount(8757938874l) + .memorySizeInBytes(8757938874l) + .missCount(8757938874l) + .totalCount(8757938874l) + .build(); + + String jsonString = "{\"cache_count\": 8757938874, \"cache_size\": 8757938874, \"evictions\":" + + " 8757938874, \"hit_count\": 8757938874, \"memory_size_in_bytes\": 8757938874, \"miss_count\":" + + " 8757938874, \"total_count\": 8757938874}"; + + StringReader reader = new StringReader(jsonString); + JacksonJsonpMapper mapper = new JacksonJsonpMapper(); + JsonParser parser = mapper.jsonProvider().createParser(reader); + QueryCacheStats actual = QueryCacheStats._DESERIALIZER.deserialize(parser, mapper); + assertEquals(expected.hitCount(), actual.hitCount()); + assertEquals(expected.memorySizeInBytes(), actual.memorySizeInBytes()); + assertEquals(expected.missCount(), actual.missCount()); + assertEquals(expected.cacheCount(), actual.cacheCount()); + assertEquals(expected.totalCount(), actual.totalCount()); + assertEquals(expected.cacheSize(), actual.cacheSize()); + assertEquals(expected.evictions(), actual.evictions()); + } }