@@ -113,15 +113,6 @@ class DestinationServiceTest
113113 "ProxyType": "Internet",
114114 "KeyStorePassword": "password",
115115 "KeyStoreLocation": "aaa"
116- },
117- {
118- "Name": "SomeDestinationName",
119- "Type": "HTTP",
120- "URL": "https://a.s4hana.ondemand.com",
121- "Authentication": "ClientCertificateAuthentication",
122- "ProxyType": "Internet",
123- "KeyStorePassword": "password",
124- "KeyStoreLocation": "aaa"
125116 }]
126117 """ ;
127118
@@ -345,9 +336,6 @@ class DestinationServiceTest
345336 @ BeforeEach
346337 void setup ()
347338 {
348- // Disable PreLookupCheck to simplify test setup
349- DestinationService .Cache .disablePreLookupCheck ();
350-
351339 providerTenant = new DefaultTenant ("provider-tenant" );
352340 subscriberTenant = new DefaultTenant ("subscriber-tenant" );
353341 context .setTenant (subscriberTenant );
@@ -454,7 +442,7 @@ void testGettingDestinationProperties()
454442
455443 assertThat (destinationList )
456444 .extracting (d -> d .get (DestinationProperty .NAME ).get ())
457- .containsExactly ("CC8-HTTP-BASIC" , "CC8-HTTP-CERT1" , "CC8-HTTP-CERT" , destinationName );
445+ .containsExactly ("CC8-HTTP-BASIC" , "CC8-HTTP-CERT1" , "CC8-HTTP-CERT" );
458446
459447 final DestinationProperties destination =
460448 destinationList
@@ -490,7 +478,7 @@ void testGettingDestinationPropertiesProvider()
490478 final Collection <DestinationProperties > destinationList = loader .getAllDestinationProperties (ALWAYS_PROVIDER );
491479 assertThat (destinationList )
492480 .extracting (d -> d .get (DestinationProperty .NAME ).get ())
493- .containsExactly ("CC8-HTTP-BASIC" , "CC8-HTTP-CERT1" , "CC8-HTTP-CERT" , destinationName );
481+ .containsExactly ("CC8-HTTP-BASIC" , "CC8-HTTP-CERT1" , "CC8-HTTP-CERT" );
494482 }
495483
496484 @ Test
@@ -506,7 +494,7 @@ void testGettingDestinationPropertiesSubscriber()
506494 final Collection <DestinationProperties > destinationList = loader .getAllDestinationProperties (ONLY_SUBSCRIBER );
507495 assertThat (destinationList )
508496 .extracting (d -> d .get (DestinationProperty .NAME ).get ())
509- .containsExactly ("CC8-HTTP-BASIC" , "CC8-HTTP-CERT1" , "CC8-HTTP-CERT" , destinationName );
497+ .containsExactly ("CC8-HTTP-BASIC" , "CC8-HTTP-CERT1" , "CC8-HTTP-CERT" );
510498 }
511499
512500 @ Test
@@ -601,10 +589,10 @@ void testGetAllDestinationsForProvider()
601589 final List <Destination > destinationList = new ArrayList <>();
602590 destinations .get ().forEach (destinationList ::add );
603591
604- assertThat (destinationList .size ()).isEqualTo (4 );
592+ assertThat (destinationList .size ()).isEqualTo (3 );
605593 assertThat (destinationList )
606594 .extracting (d -> d .get (DestinationProperty .NAME ).get ())
607- .containsOnly ("CC8-HTTP-BASIC" , "CC8-HTTP-CERT" , "CC8-HTTP-CERT1" , destinationName );
595+ .containsOnly ("CC8-HTTP-BASIC" , "CC8-HTTP-CERT" , "CC8-HTTP-CERT1" );
608596 }
609597
610598 @ SuppressWarnings ( "deprecation" )
@@ -1922,49 +1910,4 @@ private String createHttpDestinationServiceResponse( final String name, final St
19221910 }
19231911 """ , name , url );
19241912 }
1925-
1926- @ Test
1927- void testPrependGetAllDestinationsCall ()
1928- {
1929- // Reset Cache to re-enable the PreLookupCheck
1930- DestinationService .Cache .reset ();
1931-
1932- doReturn (responseServiceInstanceDestination )
1933- .when (destinationServiceAdapter )
1934- .getConfigurationAsJson (eq ("/v1/instanceDestinations" ), any ());
1935- doReturn (responseSubaccountDestination )
1936- .when (destinationServiceAdapter )
1937- .getConfigurationAsJson (eq ("/v1/subaccountDestinations" ), any ());
1938-
1939- Destination result = loader .tryGetDestination (destinationName ).get ();
1940-
1941- verify (destinationServiceAdapter , times (1 )).getConfigurationAsJson (eq ("/v1/instanceDestinations" ), any ());
1942- verify (destinationServiceAdapter , times (1 )).getConfigurationAsJson (eq ("/v1/subaccountDestinations" ), any ());
1943- verify (destinationServiceAdapter , times (1 ))
1944- .getConfigurationAsJson (eq ("/v1/destinations/" + destinationName ), any ());
1945- verifyNoMoreInteractions (destinationServiceAdapter );
1946- }
1947-
1948- @ Test
1949- void testPrependGetAllDestinationsCallWithMissingDestination ()
1950- {
1951- // Reset Cache to re-enable the PreLookupCheck
1952- DestinationService .Cache .reset ();
1953-
1954- doReturn (responseServiceInstanceDestination )
1955- .when (destinationServiceAdapter )
1956- .getConfigurationAsJson (eq ("/v1/instanceDestinations" ), any ());
1957- doReturn (responseSubaccountDestination )
1958- .when (destinationServiceAdapter )
1959- .getConfigurationAsJson (eq ("/v1/subaccountDestinations" ), any ());
1960-
1961- assertThatThrownBy (() -> loader .tryGetDestination ("thisDestinationDoesNotExist" ).get ())
1962- .isInstanceOf (DestinationNotFoundException .class )
1963- .hasMessageContaining ("was not found among the destinations of the current tenant." );
1964-
1965- verify (destinationServiceAdapter , times (1 )).getConfigurationAsJson (eq ("/v1/instanceDestinations" ), any ());
1966- verify (destinationServiceAdapter , times (1 )).getConfigurationAsJson (eq ("/v1/subaccountDestinations" ), any ());
1967- verifyNoMoreInteractions (destinationServiceAdapter );
1968-
1969- }
19701913}
0 commit comments