@@ -35,7 +35,7 @@ void testGetDelegationDestination()
3535 {
3636 final TransparentProxyDestination destination =
3737 TransparentProxyDestination
38- .dynamicDestination (TEST_DEST_NAME , VALID_URI .toString ())
38+ .destinationGateway (TEST_DEST_NAME , VALID_URI .toString ())
3939 .property (TEST_KEY , TEST_VALUE )
4040 .build ();
4141
@@ -46,7 +46,7 @@ void testGetDelegationDestination()
4646 void testGetUriSuccessfully ()
4747 {
4848 final TransparentProxyDestination destination =
49- TransparentProxyDestination .dynamicDestination (TEST_DEST_NAME , VALID_URI .toString ()).build ();
49+ TransparentProxyDestination .destinationGateway (TEST_DEST_NAME , VALID_URI .toString ()).build ();
5050
5151 Assertions .assertThat (destination .getUri ()).isEqualTo (VALID_URI );
5252 }
@@ -60,7 +60,7 @@ void testHeaders()
6060
6161 final TransparentProxyDestination destination =
6262 TransparentProxyDestination
63- .dynamicDestination (TEST_DEST_NAME , VALID_URI .toString ())
63+ .destinationGateway (TEST_DEST_NAME , VALID_URI .toString ())
6464 .header (header1 )
6565 .header (header2 )
6666 .build ();
@@ -70,11 +70,11 @@ void testHeaders()
7070 }
7171
7272 @ Test
73- void testDynamicDestinationHeaders ()
73+ void testDestinationGatewayHeaders ()
7474 {
7575 final TransparentProxyDestination destination =
7676 TransparentProxyDestination
77- .dynamicDestination (TEST_DEST_NAME , VALID_URI .toString ())
77+ .destinationGateway (TEST_DEST_NAME , VALID_URI .toString ())
7878 .fragmentName ("fragName" )
7979 .fragmentOptional (true )
8080 .build ();
@@ -90,13 +90,13 @@ void testDynamicDestinationHeaders()
9090 void testTenantHeaders ()
9191 {
9292 final TransparentProxyDestination destWithTenantId =
93- TransparentProxyDestination .staticDestination (VALID_URI .toString ()).tenantId ("tenantId" ).build ();
93+ TransparentProxyDestination .destination (VALID_URI .toString ()).tenantId ("tenantId" ).build ();
9494
9595 assertThat (destWithTenantId .getHeaders (VALID_URI ))
9696 .contains (new Header (TransparentProxyDestination .TENANT_ID_HEADER_KEY , "tenantId" ));
9797
9898 final TransparentProxyDestination destWithSubdomain =
99- TransparentProxyDestination .staticDestination (VALID_URI .toString ()).tenantSubdomain ("subdomain" ).build ();
99+ TransparentProxyDestination .destination (VALID_URI .toString ()).tenantSubdomain ("subdomain" ).build ();
100100
101101 assertThat (destWithSubdomain .getHeaders (VALID_URI ))
102102 .contains (new Header (TransparentProxyDestination .TENANT_SUBDOMAIN_HEADER_KEY , "subdomain" ));
@@ -107,7 +107,7 @@ void testCommonHeaders()
107107 {
108108 final TransparentProxyDestination destination =
109109 TransparentProxyDestination
110- .staticDestination (VALID_URI .toString ())
110+ .destination (VALID_URI .toString ())
111111 .tokenServiceTenant ("tokenTenant" )
112112 .clientAssertion ("clientAssert" )
113113 .clientAssertionType ("clientAssertType" )
@@ -153,7 +153,7 @@ void testTenantIdIsAddedPerRequest()
153153 {
154154 Tenant tenant = new DefaultTenant (TEST_TENANT_ID , TEST_TENANT_SUBDOMAIN );
155155 TransparentProxyDestination destination =
156- TransparentProxyDestination .dynamicDestination (TEST_DEST_NAME , TRANSPARENT_PROXY_GATEWAY ).build ();
156+ TransparentProxyDestination .destinationGateway (TEST_DEST_NAME , TRANSPARENT_PROXY_GATEWAY ).build ();
157157 TenantAccessor .executeWithTenant (tenant , () -> {
158158 assertThat (destination .getHeaders (URI .create (TRANSPARENT_PROXY_GATEWAY )))
159159 .contains (new Header (TransparentProxyDestination .TENANT_ID_HEADER_KEY , TEST_TENANT_ID ));
@@ -168,7 +168,7 @@ void testAuthorizationHeaderIsAddedPerRequest()
168168 AuthToken token = new AuthToken (mockJwt );
169169
170170 TransparentProxyDestination destination =
171- TransparentProxyDestination .dynamicDestination (TEST_DEST_NAME , TRANSPARENT_PROXY_GATEWAY ).build ();
171+ TransparentProxyDestination .destinationGateway (TEST_DEST_NAME , TRANSPARENT_PROXY_GATEWAY ).build ();
172172 assertNotNull (destination );
173173 AuthTokenAccessor .executeWithAuthToken (token , () -> {
174174 assertThat (destination .getHeaders (URI .create (TRANSPARENT_PROXY_GATEWAY )))
@@ -181,31 +181,31 @@ void testBuildThrowsExceptionWhenDestinationNameMissing()
181181 {
182182 Assertions
183183 .assertThatThrownBy (
184- () -> TransparentProxyDestination .dynamicDestination ("" , TRANSPARENT_PROXY_GATEWAY ).build ())
184+ () -> TransparentProxyDestination .destinationGateway ("" , TRANSPARENT_PROXY_GATEWAY ).build ())
185185 .isInstanceOf (IllegalArgumentException .class )
186186 .hasMessageContaining (
187- "The 'destinationName' property is required for dynamic destinations but was not set." );
187+ "The 'destinationName' property is required for destination-gateway but was not set." );
188188 }
189189
190190 @ Test
191- void testEqualDynamicDestinations ()
191+ void testEqualDestinationGateway ()
192192 {
193193 final TransparentProxyDestination destination1 =
194- TransparentProxyDestination .dynamicDestination (TEST_DEST_NAME , VALID_URI .toString ()).build ();
194+ TransparentProxyDestination .destinationGateway (TEST_DEST_NAME , VALID_URI .toString ()).build ();
195195
196196 final TransparentProxyDestination destination2 =
197- TransparentProxyDestination .dynamicDestination (TEST_DEST_NAME , VALID_URI .toString ()).build ();
197+ TransparentProxyDestination .destinationGateway (TEST_DEST_NAME , VALID_URI .toString ()).build ();
198198 assertThat (destination1 ).isEqualTo (destination2 );
199199 }
200200
201201 @ Test
202- void testEqualStaticDestinations ()
202+ void testEqualDestination ()
203203 {
204204 final TransparentProxyDestination destination1 =
205- TransparentProxyDestination .staticDestination (VALID_URI .toString ()).build ();
205+ TransparentProxyDestination .destination (VALID_URI .toString ()).build ();
206206
207207 final TransparentProxyDestination destination2 =
208- TransparentProxyDestination .staticDestination (VALID_URI .toString ()).build ();
208+ TransparentProxyDestination .destination (VALID_URI .toString ()).build ();
209209
210210 assertThat (destination1 ).isEqualTo (destination2 );
211211 }
@@ -216,7 +216,7 @@ void testTenantIdAndTenantSubdomainCannotBePassedTogether()
216216 Assertions
217217 .assertThatThrownBy (
218218 () -> TransparentProxyDestination
219- .staticDestination (VALID_URI .toString ())
219+ .destination (VALID_URI .toString ())
220220 .tenantId ("tenantId" )
221221 .tenantSubdomain ("tenantSubdomain" )
222222 .build ())
@@ -226,7 +226,7 @@ void testTenantIdAndTenantSubdomainCannotBePassedTogether()
226226 Assertions
227227 .assertThatThrownBy (
228228 () -> TransparentProxyDestination
229- .staticDestination (VALID_URI .toString ())
229+ .destination (VALID_URI .toString ())
230230 .tenantSubdomain ("tenantSubdomain" )
231231 .tenantId ("tenantId" )
232232 .build ())
@@ -238,7 +238,7 @@ void testTenantIdAndTenantSubdomainCannotBePassedTogether()
238238 void testNoTenantHeaderWhenNoTenantPresent ()
239239 {
240240 TransparentProxyDestination destination =
241- TransparentProxyDestination .dynamicDestination (TEST_DEST_NAME , TRANSPARENT_PROXY_GATEWAY ).build ();
241+ TransparentProxyDestination .destinationGateway (TEST_DEST_NAME , TRANSPARENT_PROXY_GATEWAY ).build ();
242242 Collection <Header > headers = destination .getHeaders (URI .create (TRANSPARENT_PROXY_GATEWAY ));
243243 assertThat (
244244 headers
@@ -252,7 +252,7 @@ void testNoTenantHeaderWhenNoTenantPresent()
252252 void testNoAuthorizationHeaderWhenNoAuthTokenPresent ()
253253 {
254254 TransparentProxyDestination destination =
255- TransparentProxyDestination .dynamicDestination (TEST_DEST_NAME , TRANSPARENT_PROXY_GATEWAY ).build ();
255+ TransparentProxyDestination .destinationGateway (TEST_DEST_NAME , TRANSPARENT_PROXY_GATEWAY ).build ();
256256 Collection <Header > headers = destination .getHeaders (URI .create (TRANSPARENT_PROXY_GATEWAY ));
257257 assertThat (
258258 headers
0 commit comments