From 016c7212850b5c63fda30c7db0327de380c1cf7c Mon Sep 17 00:00:00 2001
From: aalekhj <aaljain@microsoft.com>
Date: Wed, 23 Sep 2020 15:24:32 +0530
Subject: [PATCH] Created test class for LegalTagRepositoryImpl

Created `LegalTagRepositoryImplTest.java`
---
 .../LegalTagRepositoryImplTest.java           | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 provider/legal-azure/src/test/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImplTest.java

diff --git a/provider/legal-azure/src/test/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImplTest.java b/provider/legal-azure/src/test/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImplTest.java
new file mode 100644
index 000000000..30c1e9786
--- /dev/null
+++ b/provider/legal-azure/src/test/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImplTest.java
@@ -0,0 +1,46 @@
+//  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.legal.azure.tags.dataaccess;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.opengroup.osdu.azure.CosmosStore;
+import org.opengroup.osdu.core.common.model.http.DpsHeaders;
+
+import static org.mockito.Mockito.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class LegalTagRepositoryImplTest {
+
+    private static final String dataPartitionId = "data-partition-id";
+
+    @Mock
+	private CosmosStore cosmosStore;
+
+    @Mock
+	private DpsHeaders headers;
+
+    @InjectMocks
+    private LegalTagRepositoryImpl sut;
+
+    @Before
+    public void init() {
+        lenient().doReturn(dataPartitionId).when(headers).getPartitionId();
+    }
+}
-- 
GitLab