@@ -99,37 +99,32 @@ public void testGetColumnLineageByVersionedNodeWithDownstream() {
9999
100100 @ Test
101101 public void testGetColumnLineageWithMissingNodeId () {
102- Response response = UNDER_TEST
103- .target ("/api/v1/column-lineage" )
104- .request ()
105- .get ();
106-
102+ Response response = UNDER_TEST .target ("/api/v1/column-lineage" ).request ().get ();
103+
107104 assertThat (response .getStatus ()).isEqualTo (400 );
108105 Map <String , String > error = response .readEntity (Map .class );
109106 assertThat (error .get ("error" )).isEqualTo ("Missing required query param: nodeId" );
110107 }
111108
112109 @ Test
113110 public void testGetColumnLineageWithBlankNodeId () {
114- Response response = UNDER_TEST
115- .target ("/api/v1/column-lineage" )
116- .queryParam ("nodeId" , " " )
117- .request ()
118- .get ();
119-
111+ Response response =
112+ UNDER_TEST .target ("/api/v1/column-lineage" ).queryParam ("nodeId" , " " ).request ().get ();
113+
120114 assertThat (response .getStatus ()).isEqualTo (400 );
121115 Map <String , String > error = response .readEntity (Map .class );
122116 assertThat (error .get ("error" )).isEqualTo ("Missing required query param: nodeId" );
123117 }
124118
125119 @ Test
126120 public void testGetColumnLineageWithInvalidNodeId () {
127- Response response = UNDER_TEST
128- .target ("/api/v1/column-lineage" )
129- .queryParam ("nodeId" , "invalid:format" )
130- .request ()
131- .get ();
132-
121+ Response response =
122+ UNDER_TEST
123+ .target ("/api/v1/column-lineage" )
124+ .queryParam ("nodeId" , "invalid:format" )
125+ .request ()
126+ .get ();
127+
133128 assertThat (response .getStatus ()).isEqualTo (400 );
134129 Map <String , String > error = response .readEntity (Map .class );
135130 assertThat (error .get ("error" )).isEqualTo ("Invalid nodeId format" );
@@ -141,11 +136,12 @@ public void testGetColumnLineageWithNodeNotFound() {
141136 when (lineageService .lineage (any (NodeId .class ), eq (20 ), eq (false )))
142137 .thenThrow (new NodeIdNotFoundException ("Node not found" ));
143138
144- Response response = UNDER_TEST
145- .target ("/api/v1/column-lineage" )
146- .queryParam ("nodeId" , "dataset:namespace:nonExistentDataset" )
147- .request ()
148- .get ();
139+ Response response =
140+ UNDER_TEST
141+ .target ("/api/v1/column-lineage" )
142+ .queryParam ("nodeId" , "dataset:namespace:nonExistentDataset" )
143+ .request ()
144+ .get ();
149145
150146 assertThat (response .getStatus ()).isEqualTo (404 );
151147 Map <String , String > error = response .readEntity (Map .class );
@@ -157,13 +153,14 @@ public void testGetColumnLineageWithCustomDepth() {
157153 // Mock the service to return lineage with custom depth
158154 when (lineageService .lineage (any (NodeId .class ), eq (5 ), eq (false ))).thenReturn (LINEAGE );
159155
160- final Lineage lineage = UNDER_TEST
161- .target ("/api/v1/column-lineage" )
162- .queryParam ("nodeId" , "dataset:namespace:commonDataset" )
163- .queryParam ("depth" , "5" )
164- .request ()
165- .get ()
166- .readEntity (Lineage .class );
156+ final Lineage lineage =
157+ UNDER_TEST
158+ .target ("/api/v1/column-lineage" )
159+ .queryParam ("nodeId" , "dataset:namespace:commonDataset" )
160+ .queryParam ("depth" , "5" )
161+ .request ()
162+ .get ()
163+ .readEntity (Lineage .class );
167164
168165 assertEquals (lineage , LINEAGE );
169166 }
@@ -173,13 +170,14 @@ public void testGetColumnLineageWithDownstreamForNonVersionedNode() {
173170 // Mock the service to return lineage with downstream
174171 when (lineageService .lineage (any (NodeId .class ), eq (20 ), eq (true ))).thenReturn (LINEAGE );
175172
176- final Lineage lineage = UNDER_TEST
177- .target ("/api/v1/column-lineage" )
178- .queryParam ("nodeId" , "dataset:namespace:commonDataset" )
179- .queryParam ("withDownstream" , "true" )
180- .request ()
181- .get ()
182- .readEntity (Lineage .class );
173+ final Lineage lineage =
174+ UNDER_TEST
175+ .target ("/api/v1/column-lineage" )
176+ .queryParam ("nodeId" , "dataset:namespace:commonDataset" )
177+ .queryParam ("withDownstream" , "true" )
178+ .request ()
179+ .get ()
180+ .readEntity (Lineage .class );
183181
184182 assertEquals (lineage , LINEAGE );
185183 }
@@ -190,11 +188,12 @@ public void testGetColumnLineageWithInternalServerError() {
190188 when (lineageService .lineage (any (NodeId .class ), eq (20 ), eq (false )))
191189 .thenThrow (new RuntimeException ("Internal error" ));
192190
193- Response response = UNDER_TEST
194- .target ("/api/v1/column-lineage" )
195- .queryParam ("nodeId" , "dataset:namespace:commonDataset" )
196- .request ()
197- .get ();
191+ Response response =
192+ UNDER_TEST
193+ .target ("/api/v1/column-lineage" )
194+ .queryParam ("nodeId" , "dataset:namespace:commonDataset" )
195+ .request ()
196+ .get ();
198197
199198 assertThat (response .getStatus ()).isEqualTo (500 );
200199 Map <String , String > error = response .readEntity (Map .class );
0 commit comments