Skip to content
Snippets Groups Projects
Commit f745568f authored by Smitha Manjunath's avatar Smitha Manjunath
Browse files

code cleanuo

parent fbf03df8
No related branches found
No related tags found
3 merge requests!232Update os-core-lib-azure,!231initial commit,!203Increase code coverage of Core module to 80%
Pipeline #103393 failed
Pipeline: Notification

#103394

    Showing
    with 102 additions and 36 deletions
    // Copyright © Microsoft Corporation
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    //
    // http://www.apache.org/licenses/LICENSE-2.0
    //
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    package org.opengroup.osdu.notification.api; package org.opengroup.osdu.notification.api;
    import org.junit.Before; import org.junit.Before;
    ...@@ -19,6 +33,7 @@ public class GlobalErrorControllerTest { ...@@ -19,6 +33,7 @@ public class GlobalErrorControllerTest {
    @Mock @Mock
    HttpServletRequest httpServletRequest; HttpServletRequest httpServletRequest;
    @InjectMocks @InjectMocks
    private GlobalErrorController globalErrorController; private GlobalErrorController globalErrorController;
    ...@@ -33,7 +48,6 @@ public class GlobalErrorControllerTest { ...@@ -33,7 +48,6 @@ public class GlobalErrorControllerTest {
    when(httpServletRequest.getAttribute(eq("javax.servlet.error.status_code"))).thenReturn(500); when(httpServletRequest.getAttribute(eq("javax.servlet.error.status_code"))).thenReturn(500);
    String expected = globalErrorController.handleErrorGet(httpServletRequest); String expected = globalErrorController.handleErrorGet(httpServletRequest);
    assertEquals(expected, "{\"code\": 500, \"reason:\": \"Internal Server Error\" \"message\":\"An unknown error has occurred\" }"); assertEquals(expected, "{\"code\": 500, \"reason:\": \"Internal Server Error\" \"message\":\"An unknown error has occurred\" }");
    } }
    @Test @Test
    ...@@ -41,7 +55,6 @@ public class GlobalErrorControllerTest { ...@@ -41,7 +55,6 @@ public class GlobalErrorControllerTest {
    when(httpServletRequest.getAttribute(eq("javax.servlet.error.status_code"))).thenReturn(404); when(httpServletRequest.getAttribute(eq("javax.servlet.error.status_code"))).thenReturn(404);
    String expected = globalErrorController.handleErrorPut(httpServletRequest); String expected = globalErrorController.handleErrorPut(httpServletRequest);
    assertEquals(expected, "{\"code\": 404, \"reason:\": \"Not Found\" \"message\":\"sample exception\" }"); assertEquals(expected, "{\"code\": 404, \"reason:\": \"Not Found\" \"message\":\"sample exception\" }");
    } }
    @Test @Test
    ...@@ -49,7 +62,6 @@ public class GlobalErrorControllerTest { ...@@ -49,7 +62,6 @@ public class GlobalErrorControllerTest {
    when(httpServletRequest.getAttribute(eq("javax.servlet.error.status_code"))).thenReturn(500); when(httpServletRequest.getAttribute(eq("javax.servlet.error.status_code"))).thenReturn(500);
    String expected = globalErrorController.handleErrorPatch(httpServletRequest); String expected = globalErrorController.handleErrorPatch(httpServletRequest);
    assertEquals(expected, "{\"code\": 500, \"reason:\": \"Internal Server Error\" \"message\":\"An unknown error has occurred\" }"); assertEquals(expected, "{\"code\": 500, \"reason:\": \"Internal Server Error\" \"message\":\"An unknown error has occurred\" }");
    } }
    @Test @Test
    ...@@ -69,7 +81,6 @@ public class GlobalErrorControllerTest { ...@@ -69,7 +81,6 @@ public class GlobalErrorControllerTest {
    @Test @Test
    public void getErrorPathTest() { public void getErrorPathTest() {
    assertEquals(globalErrorController.getErrorPath(), "/error"); assertEquals(globalErrorController.getErrorPath(), "/error");
    } }
    } }
    \ No newline at end of file
    ...@@ -36,8 +36,10 @@ import static org.mockito.Mockito.when; ...@@ -36,8 +36,10 @@ import static org.mockito.Mockito.when;
    @RunWith(MockitoJUnitRunner.class) @RunWith(MockitoJUnitRunner.class)
    public class PubsubEndpointTest { public class PubsubEndpointTest {
    private static final String NOTIFICATION_ID = "test-notification-id"; private static final String NOTIFICATION_ID = "test-notification-id";
    private static final String PUBSUB_MESSAGE = "test-pubsub-message-data"; private static final String PUBSUB_MESSAGE = "test-pubsub-message-data";
    private final HttpResponse response = new HttpResponse();
    @Mock @Mock
    private IPubsubRequestBodyExtractor pubsubRequestBodyExtractor; private IPubsubRequestBodyExtractor pubsubRequestBodyExtractor;
    @Mock @Mock
    ...@@ -46,7 +48,6 @@ public class PubsubEndpointTest { ...@@ -46,7 +48,6 @@ public class PubsubEndpointTest {
    private JaxRsDpsLog log; private JaxRsDpsLog log;
    @InjectMocks @InjectMocks
    private PubsubEndpoint sut; private PubsubEndpoint sut;
    private final HttpResponse response = new HttpResponse();
    @Before @Before
    public void setup() throws Exception { public void setup() throws Exception {
    ......
    ...@@ -61,7 +61,7 @@ public class AuthorizationServiceEntitlementsTest { ...@@ -61,7 +61,7 @@ public class AuthorizationServiceEntitlementsTest {
    } }
    @Test @Test
    public void should_returnUser_when_ussrHasPermission() throws EntitlementsException { public void should_returnUser_when_userHasPermission() throws EntitlementsException {
    sut = createSut("service.register.user"); sut = createSut("service.register.user");
    AuthorizationResponse result = sut.authorizeAny(DpsHeaders.createFromMap(new HashMap<>()), "service.register.user"); AuthorizationResponse result = sut.authorizeAny(DpsHeaders.createFromMap(new HashMap<>()), "service.register.user");
    ...@@ -70,7 +70,7 @@ public class AuthorizationServiceEntitlementsTest { ...@@ -70,7 +70,7 @@ public class AuthorizationServiceEntitlementsTest {
    } }
    @Test @Test
    public void should_returnUser_when_ussrHasAnyPermission() throws EntitlementsException { public void should_returnUser_when_userHasAnyPermission() throws EntitlementsException {
    sut = createSut("service.register.editor"); sut = createSut("service.register.editor");
    AuthorizationResponse result = sut.authorizeAny(DpsHeaders.createFromMap(new HashMap<>()), "service.register.user", "service.register.editor"); AuthorizationResponse result = sut.authorizeAny(DpsHeaders.createFromMap(new HashMap<>()), "service.register.user", "service.register.editor");
    ......
    // Copyright © Microsoft Corporation
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    //
    // http://www.apache.org/licenses/LICENSE-2.0
    //
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    package org.opengroup.osdu.notification.auth.factory; package org.opengroup.osdu.notification.auth.factory;
    import org.junit.Before; import org.junit.Before;
    ......
    ...@@ -58,8 +58,6 @@ public class CredentialHeadersProviderTest { ...@@ -58,8 +58,6 @@ public class CredentialHeadersProviderTest {
    assertEquals(dpsHeaders.getHeaders().get("content-type"), "application/json"); assertEquals(dpsHeaders.getHeaders().get("content-type"), "application/json");
    assertEquals(dpsHeaders.getHeaders().get("authorization"), "sampleAuthToken"); assertEquals(dpsHeaders.getHeaders().get("authorization"), "sampleAuthToken");
    assertEquals(dpsHeaders.getHeaders().get("data-partition-id"), "opendes"); assertEquals(dpsHeaders.getHeaders().get("data-partition-id"), "opendes");
    } }
    } }
    \ No newline at end of file
    ...@@ -64,13 +64,11 @@ public class RequestInfoExtTest { ...@@ -64,13 +64,11 @@ public class RequestInfoExtTest {
    @Test @Test
    public void assignPartitionIdIfNotInHeaderTest() { public void assignPartitionIdIfNotInHeaderTest() {
    when(http.getMethod()).thenReturn("POST"); when(http.getMethod()).thenReturn("POST");
    when(headers.getPartitionId()).thenReturn(null); when(headers.getPartitionId()).thenReturn(null);
    when(requestBodyExtractor.extractAttributesFromRequestBody()).thenReturn(httpHeaders); when(requestBodyExtractor.extractAttributesFromRequestBody()).thenReturn(httpHeaders);
    this.sut.assignPartitionIdIfNotInHeader(); this.sut.assignPartitionIdIfNotInHeader();
    verify(requestBodyExtractor, times(1)).extractAttributesFromRequestBody(); verify(requestBodyExtractor, times(1)).extractAttributesFromRequestBody();
    } }
    } }
    // Copyright © Microsoft Corporation
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    //
    // http://www.apache.org/licenses/LICENSE-2.0
    //
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    package org.opengroup.osdu.notification.di; package org.opengroup.osdu.notification.di;
    import org.junit.Before; import org.junit.Before;
    ...@@ -30,7 +44,6 @@ public class SubscriptionCacheFactoryTest { ...@@ -30,7 +44,6 @@ public class SubscriptionCacheFactoryTest {
    @Mock @Mock
    private TenantInfo tenantInfo; private TenantInfo tenantInfo;
    @Before @Before
    public void setup() { public void setup() {
    subscriptionCacheFactory = new SubscriptionCacheFactory(1234567, 1000); subscriptionCacheFactory = new SubscriptionCacheFactory(1234567, 1000);
    ...@@ -42,13 +55,10 @@ public class SubscriptionCacheFactoryTest { ...@@ -42,13 +55,10 @@ public class SubscriptionCacheFactoryTest {
    when(headers.getPartitionIdWithFallbackToAccountId()).thenReturn("opendes"); when(headers.getPartitionIdWithFallbackToAccountId()).thenReturn("opendes");
    when(tenantInfo.getDataPartitionId()).thenReturn("opendes"); when(tenantInfo.getDataPartitionId()).thenReturn("opendes");
    subscriptionCacheFactory.put("testKey", "testVal"); subscriptionCacheFactory.put("testKey", "testVal");
    } }
    @Test @Test
    public void getTest() { public void getTest() {
    String actual = subscriptionCacheFactory.get("testKey"); String actual = subscriptionCacheFactory.get("testKey");
    assertEquals("testVal", actual); assertEquals("testVal", actual);
    } }
    ...@@ -57,7 +67,6 @@ public class SubscriptionCacheFactoryTest { ...@@ -57,7 +67,6 @@ public class SubscriptionCacheFactoryTest {
    public void deleteTest() { public void deleteTest() {
    subscriptionCacheFactory.delete("testKey"); subscriptionCacheFactory.delete("testKey");
    assertNull(subscriptionCacheFactory.get("testKey")); assertNull(subscriptionCacheFactory.get("testKey"));
    } }
    @Test @Test
    ......
    // Copyright © Microsoft Corporation
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    //
    // http://www.apache.org/licenses/LICENSE-2.0
    //
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    package org.opengroup.osdu.notification.errors; package org.opengroup.osdu.notification.errors;
    import org.junit.Before; import org.junit.Before;
    ...@@ -48,36 +62,35 @@ public class SpringExceptionMapperTest { ...@@ -48,36 +62,35 @@ public class SpringExceptionMapperTest {
    appException.setOriginalException(new NullPointerException()); appException.setOriginalException(new NullPointerException());
    ResponseEntity<Object> actual = springExceptionMapper.handleAppException(appException); ResponseEntity<Object> actual = springExceptionMapper.handleAppException(appException);
    AppError appError = (AppError) actual.getBody(); AppError appError = (AppError) actual.getBody();
    assertNotNull(actual); assertNotNull(actual);
    assertEquals(400, Objects.requireNonNull(appError).getCode()); assertEquals(400, Objects.requireNonNull(appError).getCode());
    assertEquals("Sample app exception reason", appError.getReason()); assertEquals("Sample app exception reason", appError.getReason());
    assertEquals("Sample app exception message", appError.getMessage()); assertEquals("Sample app exception message", appError.getMessage());
    } }
    @Test @Test
    public void handleValidationException() { public void handleValidationException() {
    ValidationException validationException = new ValidationException("Sample Validation Exception"); ValidationException validationException = new ValidationException("Sample Validation Exception");
    ResponseEntity<Object> actual = springExceptionMapper.handleValidationException(validationException); ResponseEntity<Object> actual = springExceptionMapper.handleValidationException(validationException);
    assertNotNull(actual);
    AppError appError = (AppError) actual.getBody(); AppError appError = (AppError) actual.getBody();
    assertNotNull(actual);
    assertEquals(400, appError.getCode()); assertEquals(400, appError.getCode());
    assertEquals("Sample Validation Exception", appError.getMessage()); assertEquals("Sample Validation Exception", appError.getMessage());
    assertEquals("Bad request", appError.getReason()); assertEquals("Bad request", appError.getReason());
    } }
    @Test @Test
    public void handleAccessDeniedException() { public void handleAccessDeniedException() {
    AccessDeniedException accessDeniedException = new AccessDeniedException("Sample Access Denied Exception"); AccessDeniedException accessDeniedException = new AccessDeniedException("Sample Access Denied Exception");
    ResponseEntity<Object> actual = springExceptionMapper.handleAccessDeniedException(accessDeniedException, request); ResponseEntity<Object> actual = springExceptionMapper.handleAccessDeniedException(accessDeniedException, request);
    assertNotNull(actual);
    AppError appError = (AppError) actual.getBody(); AppError appError = (AppError) actual.getBody();
    assertNotNull(actual);
    assertEquals(401, appError.getCode()); assertEquals(401, appError.getCode());
    assertEquals("Sample Access Denied Exception", appError.getMessage()); assertEquals("Sample Access Denied Exception", appError.getMessage());
    assertEquals("Unauthorized", appError.getReason()); assertEquals("Unauthorized", appError.getReason());
    } }
    @Test @Test
    ...@@ -85,31 +98,30 @@ public class SpringExceptionMapperTest { ...@@ -85,31 +98,30 @@ public class SpringExceptionMapperTest {
    Exception exception = new Exception("A General Exception"); Exception exception = new Exception("A General Exception");
    ResponseEntity<Object> actual = springExceptionMapper.handleGeneralException(exception); ResponseEntity<Object> actual = springExceptionMapper.handleGeneralException(exception);
    AppError appError = (AppError) actual.getBody(); AppError appError = (AppError) actual.getBody();
    assertNotNull(appError); assertNotNull(appError);
    assertEquals(500, appError.getCode()); assertEquals(500, appError.getCode());
    assertEquals("An unknown error has occurred.", appError.getMessage()); assertEquals("An unknown error has occurred.", appError.getMessage());
    assertEquals("Server Error", appError.getReason()); assertEquals("Server Error", appError.getReason());
    } }
    @Test @Test
    public void handleIOException_connectionClosed() { public void handleIOException_connectionClosed() {
    IOException ioException = new IOException("Sample IO Exception due to broken pipe"); IOException ioException = new IOException("Sample IO Exception due to broken pipe");
    ResponseEntity<Object> actual = springExceptionMapper.handleIOException(ioException); ResponseEntity<Object> actual = springExceptionMapper.handleIOException(ioException);
    assertEquals(actual, null);
    assertEquals(actual, null);
    } }
    @Test @Test
    public void handleIOExceptionTest() { public void handleIOExceptionTest() {
    IOException ioException = new IOException("Sample IO Exception"); IOException ioException = new IOException("Sample IO Exception");
    ResponseEntity<Object> actual = springExceptionMapper.handleIOException(ioException); ResponseEntity<Object> actual = springExceptionMapper.handleIOException(ioException);
    assertNotNull(actual);
    AppError appError = (AppError) actual.getBody(); AppError appError = (AppError) actual.getBody();
    assertNotNull(actual);
    assertEquals("Unknown error", appError.getReason()); assertEquals("Unknown error", appError.getReason());
    assertEquals("Sample IO Exception", appError.getMessage()); assertEquals("Sample IO Exception", appError.getMessage());
    assertEquals(503, appError.getCode()); assertEquals(503, appError.getCode());
    } }
    } }
    \ No newline at end of file
    // Copyright © Microsoft Corporation
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    //
    // http://www.apache.org/licenses/LICENSE-2.0
    //
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    package org.opengroup.osdu.notification.logging; package org.opengroup.osdu.notification.logging;
    import org.junit.Before; import org.junit.Before;
    ......
    ...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
    package org.opengroup.osdu.notification.service; package org.opengroup.osdu.notification.service;
    import org.junit.Assert;
    import org.junit.BeforeClass; import org.junit.BeforeClass;
    import org.junit.Test; import org.junit.Test;
    import org.junit.runner.RunWith; import org.junit.runner.RunWith;
    ...@@ -37,6 +36,7 @@ import org.opengroup.osdu.notification.auth.interfaces.SecretAuth; ...@@ -37,6 +36,7 @@ import org.opengroup.osdu.notification.auth.interfaces.SecretAuth;
    import java.util.HashMap; import java.util.HashMap;
    import java.util.Map; import java.util.Map;
    import static org.junit.Assert.assertEquals;
    import static org.junit.Assert.fail; import static org.junit.Assert.fail;
    import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.any;
    import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
    ...@@ -82,7 +82,6 @@ public class NotificationHandlerTest { ...@@ -82,7 +82,6 @@ public class NotificationHandlerTest {
    value.setKey("keyFile"); value.setKey("keyFile");
    secret.setValue(value); secret.setValue(value);
    gsa_subscription.setSecret(secret); gsa_subscription.setSecret(secret);
    } }
    private static void setHmac_subscription() { private static void setHmac_subscription() {
    ...@@ -109,7 +108,7 @@ public class NotificationHandlerTest { ...@@ -109,7 +108,7 @@ public class NotificationHandlerTest {
    when(this.secretAuth.getPushUrl(gsa_subscription.getPushEndpoint())).thenReturn(gsa_subscription.getPushEndpoint()); when(this.secretAuth.getPushUrl(gsa_subscription.getPushEndpoint())).thenReturn(gsa_subscription.getPushEndpoint());
    when(this.secretAuth.getRequestHeaders()).thenReturn(headers); when(this.secretAuth.getRequestHeaders()).thenReturn(headers);
    HttpResponse response = this.sut.notifySubscriber(NOTIFICATION_ID, PUBSUB_MESSAGE, headers); HttpResponse response = this.sut.notifySubscriber(NOTIFICATION_ID, PUBSUB_MESSAGE, headers);
    Assert.assertEquals(200, response.getResponseCode()); assertEquals(200, response.getResponseCode());
    } }
    @Test @Test
    ...@@ -122,13 +121,12 @@ public class NotificationHandlerTest { ...@@ -122,13 +121,12 @@ public class NotificationHandlerTest {
    when(this.secretAuth.getPushUrl(hmac_subscription.getPushEndpoint())).thenReturn(hmac_subscription.getPushEndpoint()); when(this.secretAuth.getPushUrl(hmac_subscription.getPushEndpoint())).thenReturn(hmac_subscription.getPushEndpoint());
    when(this.secretAuth.getRequestHeaders()).thenReturn(headers); when(this.secretAuth.getRequestHeaders()).thenReturn(headers);
    HttpResponse response = this.sut.notifySubscriber(NOTIFICATION_ID, PUBSUB_MESSAGE, headers); HttpResponse response = this.sut.notifySubscriber(NOTIFICATION_ID, PUBSUB_MESSAGE, headers);
    Assert.assertEquals(200, response.getResponseCode()); assertEquals(200, response.getResponseCode());
    } }
    @Test(expected = SubscriptionException.class) @Test(expected = SubscriptionException.class)
    public void should_throwException_whenSubscriptionHandlerThrowsException() throws Exception { public void should_throwException_whenSubscriptionHandlerThrowsException() throws Exception {
    Map<String, String> headers = new HashMap<String, String>(); Map<String, String> headers = new HashMap<String, String>();
    when(subscriptionHandler.getSubscriptionFromCache(NOTIFICATION_ID)).thenThrow(new SubscriptionException("error", response)); when(subscriptionHandler.getSubscriptionFromCache(NOTIFICATION_ID)).thenThrow(new SubscriptionException("error", response));
    this.sut.notifySubscriber(NOTIFICATION_ID, PUBSUB_MESSAGE, headers); this.sut.notifySubscriber(NOTIFICATION_ID, PUBSUB_MESSAGE, headers);
    fail("should throw SubscriptionException"); fail("should throw SubscriptionException");
    ......
    ...@@ -63,7 +63,6 @@ public class SubscriptionHandlerTest { ...@@ -63,7 +63,6 @@ public class SubscriptionHandlerTest {
    fail("should throw AppException"); fail("should throw AppException");
    } }
    @Test @Test
    public void should_return200_whenSubscriptionGotFromRegistration() throws Exception { public void should_return200_whenSubscriptionGotFromRegistration() throws Exception {
    when(this.subscriptionCacheFactory.get(any())).thenReturn(null); when(this.subscriptionCacheFactory.get(any())).thenReturn(null);
    ......
    // Copyright © Microsoft Corporation
    //
    // Licensed under the Apache License, Version 2.0 (the "License");
    // you may not use this file except in compliance with the License.
    // You may obtain a copy of the License at
    //
    // http://www.apache.org/licenses/LICENSE-2.0
    //
    // Unless required by applicable law or agreed to in writing, software
    // distributed under the License is distributed on an "AS IS" BASIS,
    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    // See the License for the specific language governing permissions and
    // limitations under the License.
    package org.opengroup.osdu.notification.utils; package org.opengroup.osdu.notification.utils;
    import org.junit.Before; import org.junit.Before;
    ...@@ -41,7 +55,6 @@ public class NotificationFilterTest { ...@@ -41,7 +55,6 @@ public class NotificationFilterTest {
    @Mock @Mock
    private HttpServletResponse servletResponse; private HttpServletResponse servletResponse;
    @Before @Before
    public void setup() throws ServletException, IOException { public void setup() throws ServletException, IOException {
    MockitoAnnotations.initMocks(NotificationFilterTest.this); MockitoAnnotations.initMocks(NotificationFilterTest.this);
    ...@@ -53,7 +66,6 @@ public class NotificationFilterTest { ...@@ -53,7 +66,6 @@ public class NotificationFilterTest {
    notificationFilter.doFilter(servletRequest, servletResponse, filterChain); notificationFilter.doFilter(servletRequest, servletResponse, filterChain);
    assertNotNull(dpsHeaders.getHeaders().get("correlation-id")); assertNotNull(dpsHeaders.getHeaders().get("correlation-id"));
    assertEquals(dpsHeaders.getHeaders().get("content-type"),"application/json"); assertEquals(dpsHeaders.getHeaders().get("content-type"), "application/json");
    } }
    } }
    \ No newline at end of file
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment