11package com .sap .ai .sdk .app .controllers ;
22
3- import com . sap . ai . sdk . core .model . AiDeployment ;
4- import com . sap . ai . sdk . core . model . AiDeploymentStatus ;
3+ import static org . assertj . core .api . Assertions . assertThat ;
4+
55import com .sap .ai .sdk .grounding .model .CollectionsListResponse ;
66import com .sap .ai .sdk .grounding .model .DataRepositories ;
77import com .sap .ai .sdk .grounding .model .DocumentResponse ;
88import com .sap .ai .sdk .grounding .model .Documents ;
99import com .sap .ai .sdk .grounding .model .PipelineId ;
1010import com .sap .ai .sdk .grounding .model .Pipelines ;
11- import org .junit .jupiter .api .Test ;
12-
1311import java .util .UUID ;
14-
15- import static org .assertj .core .api .Assertions .assertThat ;
12+ import org .junit .jupiter .api .Test ;
1613
1714class GroundingTest {
1815 /** Java end-to-end test specific configuration ID. "name":"config-java-e2e-test" */
1916 public static final String CONFIG_ID = "67e8d039-c7f1-4179-9f8f-60d158a36b0e" ;
17+
2018 private static final String JSON_FORMAT = "json" ;
2119
2220 @ Test
@@ -38,11 +36,9 @@ void getPipelinesGetAll() {
3836 final var pipelinesList = ((Pipelines ) result ).getResources ();
3937 final var pipelinesCount = ((Pipelines ) result ).getCount ();
4038
41- assertThat (pipelinesCount ).isGreaterThan (0 );
42- for (var pipeline : pipelinesList ) {
43- if (pipeline .getType () == "foo" ) {
44- }
45- }
39+ // we don't have testable data yet, but the endpoint works without errors
40+ assertThat (pipelinesCount ).isEqualTo (0 );
41+ assertThat (pipelinesList ).isEmpty ();
4642 }
4743
4844 @ Test
@@ -56,8 +52,8 @@ void getRepositoriesGetAll() {
5652
5753 assertThat (repositoryCount ).isGreaterThan (0 );
5854 for (var repository : repositoryList ) {
59- assertThat (repository .getId ()).isNotNull ();
60- assertThat (repository .getTitle ()).isNotNull ();
55+ assertThat (repository .getId ()).isNotNull ();
56+ assertThat (repository .getTitle ()).isNotNull ();
6157 }
6258 }
6359
@@ -94,6 +90,7 @@ void testGetDocuments() {
9490 assertThat (document .getId ()).isNotNull ();
9591 }
9692 }
93+
9794 @ Test
9895 void testGetDocumentById () {
9996 final var controller = new GroundingController ();
0 commit comments