diff --git a/src/test/java/net/ripe/rpki/commons/crypto/cms/roa/RoaPrefixTest.java b/src/test/java/net/ripe/rpki/commons/crypto/cms/roa/RoaPrefixTest.java index 300133c2..efffdbd9 100644 --- a/src/test/java/net/ripe/rpki/commons/crypto/cms/roa/RoaPrefixTest.java +++ b/src/test/java/net/ripe/rpki/commons/crypto/cms/roa/RoaPrefixTest.java @@ -55,9 +55,13 @@ public void testCalculateEffectiveLength() { var p2 = new RoaPrefix(IpRange.parse("11.0.0.0/8")); // An equal copy of p2 var p2_8 = new RoaPrefix(IpRange.parse("11.0.0.0/8"), 8); + var p2_32 = new RoaPrefix(IpRange.parse("11.0.0.0/8"), 32); + // implict maximum length is the prefix length assertThat(p2.getEffectiveMaximumLength()).isEqualTo(8); assertThat(p2_8.getEffectiveMaximumLength()).isEqualTo(8); + // and effective maximum length reflects the actual maximum length + assertThat(p2_8.getEffectiveMaximumLength()).isEqualTo(32); } @Test