- public static EmailAddress createVerifiedEmail(User u) throws InterruptedException, GigiApiException {
- EmailAddress adrr = new EmailAddress(u, createUniqueName() + "test@test.tld");
- adrr.insert(Language.getInstance(Locale.ENGLISH));
- TestMail testMail = getMailReciever().receive();
- assertEquals(adrr.getAddress(), testMail.getTo());
+ public static HttpURLConnection get(String cookie, String path) throws IOException {
+ URLConnection uc = new URL("https://" + getServerName() + path).openConnection();
+ uc.addRequestProperty("Cookie", cookie);
+ return (HttpURLConnection) uc;
+ }
+
+ public EmailAddress createVerifiedEmail(User u) throws InterruptedException, GigiApiException {
+ return createVerifiedEmail(u, createUniqueName() + "test@test.tld");
+ }
+
+ public EmailAddress createVerifiedEmail(User u, String email) throws InterruptedException, GigiApiException {
+ EmailAddress addr = new EmailAddress(u, email, Locale.ENGLISH);
+ TestMail testMail = getMailReceiver().receive();
+ assertEquals(addr.getAddress(), testMail.getTo());