@@ -68,6 +68,7 @@ public void testBitField() {
6868 assertThat (consent .getConsentRecordCreated (), Matchers .is (Instant .ofEpochMilli (14924661858L * 100 )));
6969 assertThat (consent .getConsentRecordLastUpdated (), Matchers .is (Instant .ofEpochMilli (15240021858L * 100 )));
7070 assertThat (consent .getAllowedPurposes ().size (), Matchers .is (5 ));
71+ assertThat (consent .getAllowedPurposesBits (), Matchers .is (6291482 ));
7172
7273 assertTrue (consent .isPurposeAllowed (2 ));
7374 assertFalse (consent .isPurposeAllowed (1 ));
@@ -94,6 +95,7 @@ public void testRangeEntry() {
9495 assertThat (consent .getConsentRecordCreated (), Matchers .is (Instant .ofEpochMilli (14924661858L * 100 )));
9596 assertThat (consent .getConsentRecordLastUpdated (), Matchers .is (Instant .ofEpochMilli (15240021858L * 100 )));
9697 assertThat (consent .getAllowedPurposes ().size (), Matchers .is (8 ));
98+ assertThat (consent .getAllowedPurposesBits (), Matchers .is (2000001 ));
9799
98100 assertTrue (consent .isPurposeAllowed (4 ));
99101 assertFalse (consent .isPurposeAllowed (1 ));
@@ -208,30 +210,4 @@ public void testRangeEntryConsent() {
208210 assertFalse (consent .isVendorAllowed (3 ));
209211 assertTrue (consent .isVendorAllowed (27 ));
210212 }
211-
212- @ Test
213- public void testLongRangeEntry () {
214- String consentString = "BOOMzbgOOQww_AtABAFRAb-AAAsvOA3gACAAkABgArgBaAF0AMAA1gBuAH8AQQBSgCoAL8AYQBigDIAM0AaABpgDYAOYAdgA8AB6gD4AQoAiABFQCMAI6ASABIgCTAEqAJeATIBQQCiAKSAU4BVQCtAK-AWYBaQC2ALcAXMAvAC-gGAAYcAxQDGAGQAMsAZsA0ADTAGqANcAbMA4ADjAHKAOiAdQB1gDtgHgAeMA9AD2AHzAP4BAACBAEEAIbAREBEgCKQEXARhZeYA" ;
215- VendorConsent consent = VendorConsent .fromBase64String (consentString );
216- assertThat (consent .getCmpId (), Matchers .is (45 ));
217- assertThat (consent .getCmpVersion (), Matchers .is (1 ));
218- assertThat (consent .getConsentLanguage (), Matchers .is ("FR" ));
219- assertThat (consent .getConsentRecordCreated (), Matchers .is (Instant .ofEpochMilli (15270622944L * 100 )));
220- assertThat (consent .getConsentRecordLastUpdated (), Matchers .is (Instant .ofEpochMilli (15271660607L * 100 )));
221- assertThat (consent .getAllowedPurposes ().size (), Matchers .is (5 )); assertTrue (consent .isPurposeAllowed (1 ));
222- assertTrue (consent .isPurposeAllowed (2 ));
223- assertTrue (consent .isPurposeAllowed (3 ));
224- assertTrue (consent .isPurposeAllowed (4 ));
225- assertTrue (consent .isPurposeAllowed (5 ));
226- assertFalse (consent .isPurposeAllowed (6 ));
227- assertFalse (consent .isPurposeAllowed (25 ));
228- assertFalse (consent .isPurposeAllowed (0 ));
229- assertTrue (consent .isVendorAllowed (1 ));
230- assertFalse (consent .isVendorAllowed (5 ));
231- assertTrue (consent .isVendorAllowed (45 ));
232- assertFalse (consent .isVendorAllowed (47 ));
233- assertFalse (consent .isVendorAllowed (146 ));
234- assertTrue (consent .isVendorAllowed (147 ));
235- assertThat (consent .getConsentString (), Matchers .is (consentString ));
236- }
237213}
0 commit comments