+
+ @Test
+ public void testVerificationMultiple() throws MalformedURLException, IOException, GigiApiException {
+ clearCaches();
+ newApplicant();
+
+ // verify with 35 VP
+ newAgent();
+ Notary.assure(agent, applicant, applicant.getNames()[0], applicant.getDoB(), 10, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+ Notary.assure(agent, applicant, applicant.getNames()[1], applicant.getDoB(), 10, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+
+ newAgent();
+ Notary.assure(agent, applicant, applicant.getNames()[0], applicant.getDoB(), 10, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+ Notary.assure(agent, applicant, applicant.getNames()[1], applicant.getDoB(), 10, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+
+ newAgent();
+ Notary.assure(agent, applicant, applicant.getNames()[0], applicant.getDoB(), 10, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+ Notary.assure(agent, applicant, applicant.getNames()[1], applicant.getDoB(), 10, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+
+ newAgent();
+ Notary.assure(agent, applicant, applicant.getNames()[0], applicant.getDoB(), 5, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+ Notary.assure(agent, applicant, applicant.getNames()[1], applicant.getDoB(), 5, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+
+ // add first Verification in the past result first name 45 VP
+ newAgent();
+ raiseXP(agent, 5);
+ enterVerificationInPast(10, firstName);
+
+ // add second Verification result first name 50 VP
+ enterVerification("assuredName=" + firstName, 15);
+ message = getMailReceiver().receive().getMessage();
+ assertThat(message, containsString("RA-Agent Marianne Mustermann verified your name(s):"));
+ assertThat(message, containsString("John Doe: with 15 to total 50 Verification Points." + "\n" + "You can now issue client certificates with this name."));
+ assertThat(message, containsString(requiresMoreTotal(50)));
+
+ // verify first name to 85 VP
+ newAgent();
+ Notary.assure(agent, applicant, applicant.getNames()[0], applicant.getDoB(), 10, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+
+ newAgent();
+ Notary.assure(agent, applicant, applicant.getNames()[0], applicant.getDoB(), 10, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+
+ newAgent();
+ Notary.assure(agent, applicant, applicant.getNames()[0], applicant.getDoB(), 10, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+
+ newAgent();
+ Notary.assure(agent, applicant, applicant.getNames()[0], applicant.getDoB(), 5, "Test location", "2014-11-06", AssuranceType.FACE_TO_FACE);
+
+ // add first Verification in the past result first name 95 VP
+ newAgent();
+ raiseXP(agent, 5);
+ enterVerificationInPast(10, firstName);
+ enterVerificationInPast(10, secondName);
+
+ // add second Verification result first name 100 VP, second name 50 VP
+ enterVerification("assuredName=" + firstName + "&assuredName=" + secondName, 15);
+ message = getMailReceiver().receive().getMessage();
+ assertThat(message, containsString("RA-Agent Marianne Mustermann verified your name(s):"));
+ assertThat(message, containsString("John Doe: with 15 to total 100 Verification Points."));
+ assertThat(message, containsString("James Doe: with 15 to total 50 Verification Points." + "\n" + "You can now issue client certificates with this name."));
+ assertThat(message, containsString("You can now apply for RA Agent status or code signing ability."));
+ }