Skip to content

Commit f20dc5d

Browse files
committed
Cleanedup test case
1 parent 8239fc8 commit f20dc5d

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

cds-feature-advanced-event-mesh/src/test/java/com/sap/cds/feature/messaging/aem/jms/AemMessagingConnectionProviderTest.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ void setUp() {
4747

4848
@Test
4949
void testCreateBrokerConnection_Success() throws Exception {
50-
when(endpointView.getAmqpUriKey()).thenReturn(Optional.of("amqp://example.com"));
51-
when(endpointView.getVpn()).thenReturn(Optional.of("test-vpn"));
5250
when(serviceBinding.getCredentials()).thenReturn(
5351
Map.of("endpoints", Map.of("advanced-event-mesh", Map.of("amqp_uri", "amqp://example.com")),
5452
"vpn", "test-vpn")
@@ -63,8 +61,6 @@ void testCreateBrokerConnection_Success() throws Exception {
6361

6462
@Test
6563
void testCreateBrokerConnection_MissingAmqpUri() {
66-
when(endpointView.getAmqpUriKey()).thenReturn(Optional.empty());
67-
6864
ServiceException exception = assertThrows(ServiceException.class, () -> {
6965
connectionProvider.createBrokerConnection("test-connection", Map.of());
7066
});
@@ -74,8 +70,6 @@ void testCreateBrokerConnection_MissingAmqpUri() {
7470

7571
@Test
7672
void testCreateBrokerConnection_MissingToken() throws IOException {
77-
when(endpointView.getAmqpUriKey()).thenReturn(Optional.of("amqp://example.com"));
78-
when(endpointView.getVpn()).thenReturn(Optional.of("test-vpn"));
7973
when(tokenFetchClient.fetchToken()).thenReturn(Optional.empty());
8074

8175
ServiceException exception = assertThrows(ServiceException.class, () -> {
@@ -87,8 +81,6 @@ void testCreateBrokerConnection_MissingToken() throws IOException {
8781

8882
@Test
8983
void testCreateBrokerConnection_TokenFetch() throws IOException {
90-
when(endpointView.getAmqpUriKey()).thenReturn(Optional.of("amqp://example.com"));
91-
when(endpointView.getVpn()).thenReturn(Optional.of("test-vpn"));
9284
when(serviceBinding.getCredentials()).thenReturn(
9385
Map.of("endpoints", Map.of("advanced-event-mesh", Map.of("amqp_uri", "amqp://example.com")),
9486
"vpn", "test-vpn")

0 commit comments

Comments
 (0)