diff --git a/core/src/test/java/org/elasticsearch/common/network/CidrsTests.java b/core/src/test/java/org/elasticsearch/common/network/CidrsTests.java index 7109b2db02c..0b00353f98a 100644 --- a/core/src/test/java/org/elasticsearch/common/network/CidrsTests.java +++ b/core/src/test/java/org/elasticsearch/common/network/CidrsTests.java @@ -133,8 +133,9 @@ public class CidrsTests extends ESTestCase { public void testValidCombinations() { for (long i = 0; i < (1 << 16); i++) { + String octetsString = Cidrs.octetsToString(Cidrs.longToOctets(i << 16)); for (int mask = 16; mask <= 32; mask++) { - String test = Cidrs.octetsToCIDR(Cidrs.longToOctets(i << 16), mask); + String test = octetsString + "/" + mask; long[] actual = Cidrs.cidrMaskToMinMax(test); assertNotNull(test, actual); assertEquals(test, 2, actual.length);