@@ -34,6 +34,10 @@ public void verificationTest() throws ParseException {
3434 verification = apiClient .getVerification (verification .getId ()).toBlocking ().first ();
3535 isVerificationValid (verification );
3636
37+ //Test listing verifications
38+ List <Verification > verifications = apiClient .listVerificationsSync ();
39+ areVerificationsValid (verifications );
40+
3741 //Test creation of a question set.
3842 QuestionSetRequest questionSetRequest = new QuestionSetRequest ();
3943 questionSetRequest .setTimeLimit (100000 ).setVerificationId (verification .getId ());
@@ -244,6 +248,17 @@ private Person createBadTestPerson() throws ParseException {
244248 return person ;
245249 }
246250
251+ /**
252+ * Checks for a valid verification list.
253+ * @param verificationList Verifications under test.
254+ */
255+ private void areVerificationsValid (@ Nullable final List <Verification > verificationList ) {
256+ Assert .assertNotNull (verificationList );
257+ for (Verification verification : verificationList ) {
258+ isVerificationValid (verification );
259+ }
260+ }
261+
247262 /**
248263 * Determines if the verification is valid.
249264 * @param verification Verification under test.
@@ -252,9 +267,9 @@ private void isVerificationValid(@NotNull final Verification verification) {
252267 Assert .assertNotNull (verification );
253268 Assert .assertNotNull (verification .getId ());
254269 Assert .assertNotNull (verification .getDateOfBirth ());
270+ Assert .assertNotNull (verification .getQuestionSets ());
255271
256272 areDetailsValid (verification .getDetails ());
257- areQuestionSetsValid (verification .getQuestionSets ());
258273 isIdentificationValid (verification .getIdentification ());
259274 isNameValid (verification .getName ());
260275 isAddressValid (verification .getAddress ());
0 commit comments