@Test void fromURL() throws NoSuchFieldException { FieldSetter.setField(defaultConsentReferencePolicy, defaultConsentReferencePolicy.getClass().getDeclaredField("hmacSecret"), "6VFX8YFQG5DLFKZIMNLGH9P406XR1SY4"); ConsentReference reference = defaultConsentReferencePolicy.fromURL(REDIRECT_ID, CONSENT_TYPE_AIS, ENCRYPTED_CONSENT_ID); assertNotNull(reference); assertEquals(REDIRECT_ID, reference.getRedirectId()); assertEquals(CONSENT_TYPE_AIS, reference.getConsentType()); assertEquals(ENCRYPTED_CONSENT_ID, reference.getEncryptedConsentId()); assertNotNull(reference.getCookieString()); }
@Override public ConsentReference fromURL(String redirectId, ConsentType consentType, String encryptedConsentId) { ConsentReference cr = new ConsentReference(); cr.setRedirectId(redirectId); cr.setConsentType(consentType); cr.setEncryptedConsentId(encryptedConsentId); String cookieString = toClaim(cr); cr.setCookieString(cookieString); return cr; }
DefaultConsentReferencePolicy implements ConsentReferencePolicy { @Override public ConsentReference fromURL(String redirectId, ConsentType consentType, String encryptedConsentId) { ConsentReference cr = new ConsentReference(); cr.setRedirectId(redirectId); cr.setConsentType(consentType); cr.setEncryptedConsentId(encryptedConsentId); String cookieString = toClaim(cr); cr.setCookieString(cookieString); return cr; } }
DefaultConsentReferencePolicy implements ConsentReferencePolicy { @Override public ConsentReference fromURL(String redirectId, ConsentType consentType, String encryptedConsentId) { ConsentReference cr = new ConsentReference(); cr.setRedirectId(redirectId); cr.setConsentType(consentType); cr.setEncryptedConsentId(encryptedConsentId); String cookieString = toClaim(cr); cr.setCookieString(cookieString); return cr; }  }
DefaultConsentReferencePolicy implements ConsentReferencePolicy { @Override public ConsentReference fromURL(String redirectId, ConsentType consentType, String encryptedConsentId) { ConsentReference cr = new ConsentReference(); cr.setRedirectId(redirectId); cr.setConsentType(consentType); cr.setEncryptedConsentId(encryptedConsentId); String cookieString = toClaim(cr); cr.setCookieString(cookieString); return cr; }  @Override ConsentReference fromURL(String redirectId, ConsentType consentType, String encryptedConsentId); @Override ConsentReference fromRequest(String encryptedConsentId, String authorizationId, String cookieString, boolean strict); }
DefaultConsentReferencePolicy implements ConsentReferencePolicy { @Override public ConsentReference fromURL(String redirectId, ConsentType consentType, String encryptedConsentId) { ConsentReference cr = new ConsentReference(); cr.setRedirectId(redirectId); cr.setConsentType(consentType); cr.setEncryptedConsentId(encryptedConsentId); String cookieString = toClaim(cr); cr.setCookieString(cookieString); return cr; }  @Override ConsentReference fromURL(String redirectId, ConsentType consentType, String encryptedConsentId); @Override ConsentReference fromRequest(String encryptedConsentId, String authorizationId, String cookieString, boolean strict);  }