5555import org .junit .jupiter .api .Test ;
5656import org .junit .jupiter .api .extension .ExtendWith ;
5757
58+ import java .util .ArrayList ;
5859import java .util .Arrays ;
5960import java .util .List ;
6061import java .util .UUID ;
6364import static com .formkiq .testutils .aws .FkqAttributeService .createStringAttribute ;
6465import static org .junit .jupiter .api .Assertions .assertEquals ;
6566import static org .junit .jupiter .api .Assertions .assertNotNull ;
67+ import static org .junit .jupiter .api .Assertions .assertTrue ;
6668import static org .junit .jupiter .api .Assertions .fail ;
6769
6870/** Unit Tests for request /sites/{siteId}/schema/document. */
@@ -88,10 +90,14 @@ public void testGetClassifications01() throws ApiException {
8890
8991 SchemaAttributes attr0 = createSchemaAttributes (List .of ("invoice" ), null );
9092
93+ List <String > ids = new ArrayList <>();
94+
9195 for (int i = 0 ; i < count ; i ++) {
9296 AddClassificationRequest req = new AddClassificationRequest ()
9397 .classification (new AddClassification ().name ("test_" + i ).attributes (attr0 ));
94- this .schemasApi .addClassification (siteId , req );
98+ String classificationId =
99+ this .schemasApi .addClassification (siteId , req ).getClassificationId ();
100+ ids .add (classificationId );
95101 }
96102
97103 // when
@@ -102,6 +108,7 @@ public void testGetClassifications01() throws ApiException {
102108 // then
103109 int i = 0 ;
104110 assertEquals (limit , attributes .size ());
111+ assertTrue (ids .contains (attributes .get (i ).getClassificationId ()));
105112 assertEquals ("joesmith" , attributes .get (i ).getUserId ());
106113 assertNotNull (attributes .get (i ).getInsertedDate ());
107114 assertEquals ("test_0" , attributes .get (i ++).getName ());
0 commit comments