blob: f61c8c358353c6227ecac5913a482bda780c7182 [file] [log] [blame]
Lorenzo Colitti174bab22014-06-12 13:41:17 +09001/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.net;
18
Chalard Jean39175f22020-06-26 00:41:26 +090019import static com.android.testutils.MiscAsserts.assertEqualBothWays;
20import static com.android.testutils.MiscAsserts.assertFieldCountEquals;
21import static com.android.testutils.MiscAsserts.assertNotEqualEitherWay;
22import static com.android.testutils.ParcelUtils.assertParcelingIsLossless;
Chalard Jeanaf718362019-05-30 17:11:14 +090023
Hugo Benichif9c61862016-11-10 22:45:56 +090024import static org.junit.Assert.assertArrayEquals;
25import static org.junit.Assert.assertEquals;
Hugo Benichi8253be92017-08-08 13:06:04 +090026import static org.junit.Assert.assertFalse;
27import static org.junit.Assert.assertNotEquals;
Hugo Benichi8253be92017-08-08 13:06:04 +090028import static org.junit.Assert.assertTrue;
29import static org.junit.Assert.fail;
Lorenzo Colitti174bab22014-06-12 13:41:17 +090030
Brett Chabot147f6cf2019-03-04 14:14:56 -080031import androidx.test.filters.SmallTest;
32import androidx.test.runner.AndroidJUnit4;
33
34import org.junit.Test;
35import org.junit.runner.RunWith;
Hugo Benichi8253be92017-08-08 13:06:04 +090036
37import java.net.InetAddress;
38import java.util.Random;
39
Hugo Benichi8253be92017-08-08 13:06:04 +090040@RunWith(AndroidJUnit4.class)
41@SmallTest
42public class IpPrefixTest {
Lorenzo Colitti174bab22014-06-12 13:41:17 +090043
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +090044 private static InetAddress address(String addr) {
Erik Klineb98afb02015-04-13 15:33:34 +090045 return InetAddress.parseNumericAddress(addr);
46 }
47
Lorenzo Colitti174bab22014-06-12 13:41:17 +090048 // Explicitly cast everything to byte because "error: possible loss of precision".
49 private static final byte[] IPV4_BYTES = { (byte) 192, (byte) 0, (byte) 2, (byte) 4};
50 private static final byte[] IPV6_BYTES = {
51 (byte) 0x20, (byte) 0x01, (byte) 0x0d, (byte) 0xb8,
52 (byte) 0xde, (byte) 0xad, (byte) 0xbe, (byte) 0xef,
53 (byte) 0x0f, (byte) 0x00, (byte) 0x00, (byte) 0x00,
54 (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0xa0
55 };
56
Hugo Benichi8253be92017-08-08 13:06:04 +090057 @Test
Lorenzo Colitti174bab22014-06-12 13:41:17 +090058 public void testConstructor() {
59 IpPrefix p;
60 try {
61 p = new IpPrefix((byte[]) null, 9);
62 fail("Expected NullPointerException: null byte array");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +090063 } catch (RuntimeException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +090064
65 try {
66 p = new IpPrefix((InetAddress) null, 10);
67 fail("Expected NullPointerException: null InetAddress");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +090068 } catch (RuntimeException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +090069
70 try {
71 p = new IpPrefix((String) null);
72 fail("Expected NullPointerException: null String");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +090073 } catch (RuntimeException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +090074
75
76 try {
77 byte[] b2 = {1, 2, 3, 4, 5};
78 p = new IpPrefix(b2, 29);
79 fail("Expected IllegalArgumentException: invalid array length");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +090080 } catch (IllegalArgumentException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +090081
82 try {
83 p = new IpPrefix("1.2.3.4");
84 fail("Expected IllegalArgumentException: no prefix length");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +090085 } catch (IllegalArgumentException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +090086
87 try {
88 p = new IpPrefix("1.2.3.4/");
89 fail("Expected IllegalArgumentException: empty prefix length");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +090090 } catch (IllegalArgumentException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +090091
92 try {
93 p = new IpPrefix("foo/32");
94 fail("Expected IllegalArgumentException: invalid address");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +090095 } catch (IllegalArgumentException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +090096
97 try {
98 p = new IpPrefix("1/32");
99 fail("Expected IllegalArgumentException: deprecated IPv4 format");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900100 } catch (IllegalArgumentException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900101
102 try {
103 p = new IpPrefix("1.2.3.256/32");
104 fail("Expected IllegalArgumentException: invalid IPv4 address");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900105 } catch (IllegalArgumentException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900106
107 try {
108 p = new IpPrefix("foo/32");
109 fail("Expected IllegalArgumentException: non-address");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900110 } catch (IllegalArgumentException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900111
112 try {
113 p = new IpPrefix("f00:::/32");
114 fail("Expected IllegalArgumentException: invalid IPv6 address");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900115 } catch (IllegalArgumentException expected) { }
paulhu1013c812021-03-03 22:15:11 +0800116
117 p = new IpPrefix("/64");
118 assertEquals("::/64", p.toString());
119
120 p = new IpPrefix("/128");
121 assertEquals("::1/128", p.toString());
122
123 p = new IpPrefix("[2001:db8::123]/64");
124 assertEquals("2001:db8::/64", p.toString());
Taras Antoshchuk3bbbffe2021-12-19 11:54:56 +0000125
126 p = new IpPrefix(InetAddresses.parseNumericAddress("::128"), 64);
127 assertEquals("::/64", p.toString());
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900128 }
129
Hugo Benichi8253be92017-08-08 13:06:04 +0900130 @Test
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900131 public void testTruncation() {
132 IpPrefix p;
133
134 p = new IpPrefix(IPV4_BYTES, 32);
135 assertEquals("192.0.2.4/32", p.toString());
136
137 p = new IpPrefix(IPV4_BYTES, 29);
138 assertEquals("192.0.2.0/29", p.toString());
139
140 p = new IpPrefix(IPV4_BYTES, 8);
141 assertEquals("192.0.0.0/8", p.toString());
142
143 p = new IpPrefix(IPV4_BYTES, 0);
144 assertEquals("0.0.0.0/0", p.toString());
145
146 try {
147 p = new IpPrefix(IPV4_BYTES, 33);
148 fail("Expected IllegalArgumentException: invalid prefix length");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900149 } catch (RuntimeException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900150
151 try {
152 p = new IpPrefix(IPV4_BYTES, 128);
153 fail("Expected IllegalArgumentException: invalid prefix length");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900154 } catch (RuntimeException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900155
156 try {
157 p = new IpPrefix(IPV4_BYTES, -1);
158 fail("Expected IllegalArgumentException: negative prefix length");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900159 } catch (RuntimeException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900160
161 p = new IpPrefix(IPV6_BYTES, 128);
162 assertEquals("2001:db8:dead:beef:f00::a0/128", p.toString());
163
164 p = new IpPrefix(IPV6_BYTES, 122);
165 assertEquals("2001:db8:dead:beef:f00::80/122", p.toString());
166
167 p = new IpPrefix(IPV6_BYTES, 64);
168 assertEquals("2001:db8:dead:beef::/64", p.toString());
169
170 p = new IpPrefix(IPV6_BYTES, 3);
171 assertEquals("2000::/3", p.toString());
172
173 p = new IpPrefix(IPV6_BYTES, 0);
174 assertEquals("::/0", p.toString());
175
176 try {
177 p = new IpPrefix(IPV6_BYTES, -1);
178 fail("Expected IllegalArgumentException: negative prefix length");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900179 } catch (RuntimeException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900180
181 try {
182 p = new IpPrefix(IPV6_BYTES, 129);
183 fail("Expected IllegalArgumentException: negative prefix length");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900184 } catch (RuntimeException expected) { }
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900185
186 }
187
Hugo Benichi8253be92017-08-08 13:06:04 +0900188 @Test
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900189 public void testEquals() {
190 IpPrefix p1, p2;
191
192 p1 = new IpPrefix("192.0.2.251/23");
193 p2 = new IpPrefix(new byte[]{(byte) 192, (byte) 0, (byte) 2, (byte) 251}, 23);
Chalard Jeanaf718362019-05-30 17:11:14 +0900194 assertEqualBothWays(p1, p2);
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900195
196 p1 = new IpPrefix("192.0.2.5/23");
Chalard Jeanaf718362019-05-30 17:11:14 +0900197 assertEqualBothWays(p1, p2);
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900198
199 p1 = new IpPrefix("192.0.2.5/24");
Chalard Jeanaf718362019-05-30 17:11:14 +0900200 assertNotEqualEitherWay(p1, p2);
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900201
202 p1 = new IpPrefix("192.0.4.5/23");
Chalard Jeanaf718362019-05-30 17:11:14 +0900203 assertNotEqualEitherWay(p1, p2);
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900204
205
206 p1 = new IpPrefix("2001:db8:dead:beef:f00::80/122");
207 p2 = new IpPrefix(IPV6_BYTES, 122);
208 assertEquals("2001:db8:dead:beef:f00::80/122", p2.toString());
Chalard Jeanaf718362019-05-30 17:11:14 +0900209 assertEqualBothWays(p1, p2);
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900210
211 p1 = new IpPrefix("2001:db8:dead:beef:f00::bf/122");
Chalard Jeanaf718362019-05-30 17:11:14 +0900212 assertEqualBothWays(p1, p2);
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900213
214 p1 = new IpPrefix("2001:db8:dead:beef:f00::8:0/123");
Chalard Jeanaf718362019-05-30 17:11:14 +0900215 assertNotEqualEitherWay(p1, p2);
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900216
217 p1 = new IpPrefix("2001:db8:dead:beef::/122");
Chalard Jeanaf718362019-05-30 17:11:14 +0900218 assertNotEqualEitherWay(p1, p2);
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900219
220 // 192.0.2.4/32 != c000:0204::/32.
221 byte[] ipv6bytes = new byte[16];
222 System.arraycopy(IPV4_BYTES, 0, ipv6bytes, 0, IPV4_BYTES.length);
223 p1 = new IpPrefix(ipv6bytes, 32);
Chalard Jeanaf718362019-05-30 17:11:14 +0900224 assertEqualBothWays(p1, new IpPrefix("c000:0204::/32"));
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900225
226 p2 = new IpPrefix(IPV4_BYTES, 32);
Chalard Jeanaf718362019-05-30 17:11:14 +0900227 assertNotEqualEitherWay(p1, p2);
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900228 }
229
Hugo Benichi8253be92017-08-08 13:06:04 +0900230 @Test
Chalard Jean9cbc8822018-02-26 11:52:46 +0900231 public void testContainsInetAddress() {
Erik Klineb98afb02015-04-13 15:33:34 +0900232 IpPrefix p = new IpPrefix("2001:db8:f00::ace:d00d/127");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900233 assertTrue(p.contains(address("2001:db8:f00::ace:d00c")));
234 assertTrue(p.contains(address("2001:db8:f00::ace:d00d")));
235 assertFalse(p.contains(address("2001:db8:f00::ace:d00e")));
236 assertFalse(p.contains(address("2001:db8:f00::bad:d00d")));
237 assertFalse(p.contains(address("2001:4868:4860::8888")));
238 assertFalse(p.contains(address("8.8.8.8")));
Erik Klineb98afb02015-04-13 15:33:34 +0900239
240 p = new IpPrefix("192.0.2.0/23");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900241 assertTrue(p.contains(address("192.0.2.43")));
242 assertTrue(p.contains(address("192.0.3.21")));
243 assertFalse(p.contains(address("192.0.0.21")));
244 assertFalse(p.contains(address("8.8.8.8")));
245 assertFalse(p.contains(address("2001:4868:4860::8888")));
Erik Klineb98afb02015-04-13 15:33:34 +0900246
247 IpPrefix ipv6Default = new IpPrefix("::/0");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900248 assertTrue(ipv6Default.contains(address("2001:db8::f00")));
249 assertFalse(ipv6Default.contains(address("192.0.2.1")));
Erik Klineb98afb02015-04-13 15:33:34 +0900250
251 IpPrefix ipv4Default = new IpPrefix("0.0.0.0/0");
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900252 assertTrue(ipv4Default.contains(address("255.255.255.255")));
253 assertTrue(ipv4Default.contains(address("192.0.2.1")));
254 assertFalse(ipv4Default.contains(address("2001:db8::f00")));
Erik Klineb98afb02015-04-13 15:33:34 +0900255 }
256
Hugo Benichi8253be92017-08-08 13:06:04 +0900257 @Test
Chalard Jean9cbc8822018-02-26 11:52:46 +0900258 public void testContainsIpPrefix() {
259 assertTrue(new IpPrefix("0.0.0.0/0").containsPrefix(new IpPrefix("0.0.0.0/0")));
260 assertTrue(new IpPrefix("0.0.0.0/0").containsPrefix(new IpPrefix("1.2.3.4/0")));
261 assertTrue(new IpPrefix("0.0.0.0/0").containsPrefix(new IpPrefix("1.2.3.4/8")));
262 assertTrue(new IpPrefix("0.0.0.0/0").containsPrefix(new IpPrefix("1.2.3.4/24")));
263 assertTrue(new IpPrefix("0.0.0.0/0").containsPrefix(new IpPrefix("1.2.3.4/23")));
264
265 assertTrue(new IpPrefix("1.2.3.4/8").containsPrefix(new IpPrefix("1.2.3.4/8")));
266 assertTrue(new IpPrefix("1.2.3.4/8").containsPrefix(new IpPrefix("1.254.12.9/8")));
267 assertTrue(new IpPrefix("1.2.3.4/21").containsPrefix(new IpPrefix("1.2.3.4/21")));
268 assertTrue(new IpPrefix("1.2.3.4/32").containsPrefix(new IpPrefix("1.2.3.4/32")));
269
270 assertTrue(new IpPrefix("1.2.3.4/20").containsPrefix(new IpPrefix("1.2.3.0/24")));
271
272 assertFalse(new IpPrefix("1.2.3.4/32").containsPrefix(new IpPrefix("1.2.3.5/32")));
273 assertFalse(new IpPrefix("1.2.3.4/8").containsPrefix(new IpPrefix("2.2.3.4/8")));
274 assertFalse(new IpPrefix("0.0.0.0/16").containsPrefix(new IpPrefix("0.0.0.0/15")));
275 assertFalse(new IpPrefix("100.0.0.0/8").containsPrefix(new IpPrefix("99.0.0.0/8")));
276
277 assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("::/0")));
278 assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("2001:db8::f00/1")));
279 assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("3d8a:661:a0::770/8")));
280 assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("2001:db8::f00/8")));
281 assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("2001:db8::f00/64")));
282 assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("2001:db8::f00/113")));
283 assertTrue(new IpPrefix("::/0").containsPrefix(new IpPrefix("2001:db8::f00/128")));
284
285 assertTrue(new IpPrefix("2001:db8:f00::ace:d00d/64").containsPrefix(
286 new IpPrefix("2001:db8:f00::ace:d00d/64")));
287 assertTrue(new IpPrefix("2001:db8:f00::ace:d00d/64").containsPrefix(
288 new IpPrefix("2001:db8:f00::ace:d00d/120")));
289 assertFalse(new IpPrefix("2001:db8:f00::ace:d00d/64").containsPrefix(
290 new IpPrefix("2001:db8:f00::ace:d00d/32")));
291 assertFalse(new IpPrefix("2001:db8:f00::ace:d00d/64").containsPrefix(
292 new IpPrefix("2006:db8:f00::ace:d00d/96")));
293
294 assertTrue(new IpPrefix("2001:db8:f00::ace:d00d/128").containsPrefix(
295 new IpPrefix("2001:db8:f00::ace:d00d/128")));
296 assertTrue(new IpPrefix("2001:db8:f00::ace:d00d/100").containsPrefix(
297 new IpPrefix("2001:db8:f00::ace:ccaf/110")));
298
299 assertFalse(new IpPrefix("2001:db8:f00::ace:d00d/128").containsPrefix(
300 new IpPrefix("2001:db8:f00::ace:d00e/128")));
301 assertFalse(new IpPrefix("::/30").containsPrefix(new IpPrefix("::/29")));
302 }
303
304 @Test
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900305 public void testHashCode() {
Hugo Benichif9c61862016-11-10 22:45:56 +0900306 IpPrefix p = new IpPrefix(new byte[4], 0);
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900307 Random random = new Random();
308 for (int i = 0; i < 100; i++) {
Hugo Benichif9c61862016-11-10 22:45:56 +0900309 final IpPrefix oldP = p;
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900310 if (random.nextBoolean()) {
311 // IPv4.
312 byte[] b = new byte[4];
313 random.nextBytes(b);
314 p = new IpPrefix(b, random.nextInt(33));
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900315 } else {
316 // IPv6.
317 byte[] b = new byte[16];
318 random.nextBytes(b);
319 p = new IpPrefix(b, random.nextInt(129));
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900320 }
Hugo Benichif9c61862016-11-10 22:45:56 +0900321 if (p.equals(oldP)) {
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900322 assertEquals(p.hashCode(), oldP.hashCode());
Hugo Benichif9c61862016-11-10 22:45:56 +0900323 }
324 if (p.hashCode() != oldP.hashCode()) {
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900325 assertNotEquals(p, oldP);
Hugo Benichif9c61862016-11-10 22:45:56 +0900326 }
327 }
328 }
329
Hugo Benichi8253be92017-08-08 13:06:04 +0900330 @Test
Hugo Benichif9c61862016-11-10 22:45:56 +0900331 public void testHashCodeIsNotConstant() {
332 IpPrefix[] prefixes = {
333 new IpPrefix("2001:db8:f00::ace:d00d/127"),
334 new IpPrefix("192.0.2.0/23"),
335 new IpPrefix("::/0"),
336 new IpPrefix("0.0.0.0/0"),
337 };
338 for (int i = 0; i < prefixes.length; i++) {
Remi NGUYEN VAN49b15872019-04-03 17:21:41 +0900339 for (int j = i + 1; j < prefixes.length; j++) {
340 assertNotEquals(prefixes[i].hashCode(), prefixes[j].hashCode());
341 }
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900342 }
343 }
344
Hugo Benichi8253be92017-08-08 13:06:04 +0900345 @Test
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900346 public void testMappedAddressesAreBroken() {
347 // 192.0.2.0/24 != ::ffff:c000:0204/120, but because we use InetAddress,
348 // we are unable to comprehend that.
349 byte[] ipv6bytes = {
350 (byte) 0, (byte) 0, (byte) 0, (byte) 0,
351 (byte) 0, (byte) 0, (byte) 0, (byte) 0,
352 (byte) 0, (byte) 0, (byte) 0xff, (byte) 0xff,
353 (byte) 192, (byte) 0, (byte) 2, (byte) 0};
354 IpPrefix p = new IpPrefix(ipv6bytes, 120);
355 assertEquals(16, p.getRawAddress().length); // Fine.
356 assertArrayEquals(ipv6bytes, p.getRawAddress()); // Fine.
357
358 // Broken.
359 assertEquals("192.0.2.0/120", p.toString());
360 assertEquals(InetAddress.parseNumericAddress("192.0.2.0"), p.getAddress());
361 }
362
Hugo Benichi8253be92017-08-08 13:06:04 +0900363 @Test
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900364 public void testParceling() {
365 IpPrefix p;
366
367 p = new IpPrefix("2001:4860:db8::/64");
368 assertParcelingIsLossless(p);
Hugo Benichi8253be92017-08-08 13:06:04 +0900369 assertTrue(p.isIPv6());
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900370
371 p = new IpPrefix("192.0.2.0/25");
372 assertParcelingIsLossless(p);
Hugo Benichi8253be92017-08-08 13:06:04 +0900373 assertTrue(p.isIPv4());
Chalard Jeanaf718362019-05-30 17:11:14 +0900374
375 assertFieldCountEquals(2, IpPrefix.class);
Lorenzo Colitti174bab22014-06-12 13:41:17 +0900376 }
377}