+ testChallengeText("you need to pass the Organisation Agent Challenge", false);
+
+ // test TTP Agent challenge
+ testChallengeText("you need to pass the TTP RA Agent Challenge", false);
+
+ grant(u, Group.TTP_AGENT);
+ cookie = login(loginPrivateKey, loginCertificate.cert());
+ testChallengeText("you need to pass the TTP RA Agent Challenge", true);
+
+ addChallengeInPast(u.getId(), CATSType.TTP_AGENT_CHALLENGE);
+ testChallengeText("you need to pass the TTP RA Agent Challenge", true);
+
+ addChallenge(u.getId(), CATSType.TTP_AGENT_CHALLENGE);
+ testChallengeText("you need to pass the TTP RA Agent Challenge", false);
+ }
+
+ private void testChallengeText(String contentText, boolean contains) throws IOException, MalformedURLException {
+ URLConnection uc = new URL("https://" + getSecureServerName()).openConnection();