test net.i2p.util.Addresses::isDeprecated

This commit is contained in:
2021-01-20 23:12:00 +01:00
parent 78a09c27f7
commit 61ffbce1c1

View File

@@ -57,4 +57,13 @@ public class AddressesTest {
byte[] address = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
assertFalse(Addresses.isDynamic((Inet6Address) Inet6Address.getByAddress(host, address)));
}
/**
* Should always return false when the address isn't in the cache
*/
@Test
public void isDeprecated() throws UnknownHostException {
String host = "localhost";
byte[] address = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1};
assertFalse(Addresses.isDeprecated((Inet6Address) Inet6Address.getByAddress(host, address)));
}
}