1 package jtest.org.onap.ccsdk.sli.adaptors.ra;
3 import java.util.HashMap;
6 import org.junit.Assert;
7 import org.junit.FixMethodOrder;
9 import org.junit.runner.RunWith;
10 import org.junit.runners.MethodSorters;
11 import org.onap.ccsdk.sli.adaptors.ra.ResourceLockNode;
12 import org.slf4j.Logger;
13 import org.slf4j.LoggerFactory;
14 import org.springframework.beans.factory.annotation.Autowired;
15 import org.springframework.test.context.ContextConfiguration;
16 import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
18 @RunWith(SpringJUnit4ClassRunner.class)
19 @ContextConfiguration(locations = { "classpath:test-context.xml" })
20 @FixMethodOrder(MethodSorters.NAME_ASCENDING)
21 public class TestResourceLockNode {
23 @SuppressWarnings("unused")
24 private static final Logger log = LoggerFactory.getLogger(TestResourceLockNode.class);
27 private ResourceLockNode resourceLockNode;
30 public void test1() throws Exception {
31 Map<String, String> paramMap = new HashMap<>();
32 paramMap.put("resource-name", "test-resource-1");
33 paramMap.put("lock-requester", "SDNA");
35 resourceLockNode.lockResource(paramMap, null);
36 resourceLockNode.unlockResource(paramMap, null);
37 Assert.assertNotNull(paramMap);