aboutsummaryrefslogtreecommitdiffstats
path: root/appc-core
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-11-28 18:24:21 +0530
committerPatrick Brady <patrick.brady@att.com>2018-12-12 17:17:01 +0000
commit73dcc9677a000d0ea7b900db6fc1fb0689863b0a (patch)
tree16c4ed12d70e8e645d955174c092ff3292f9eadd /appc-core
parent9e63c1996f8433c147a95b09e25970e16af15db0 (diff)
formatted code in LRUCacheTest.java
and removed unused imports Issue-ID: APPC-1086 Change-Id: I18009404898a938ec23be77bfcf94084f4e9badd Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
Diffstat (limited to 'appc-core')
-rw-r--r--appc-core/appc-common-bundle/src/test/java/org/onap/appc/cache/impl/LRUCacheTest.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/appc-core/appc-common-bundle/src/test/java/org/onap/appc/cache/impl/LRUCacheTest.java b/appc-core/appc-common-bundle/src/test/java/org/onap/appc/cache/impl/LRUCacheTest.java
index 2eca72a07..1d7e4b4a8 100644
--- a/appc-core/appc-common-bundle/src/test/java/org/onap/appc/cache/impl/LRUCacheTest.java
+++ b/appc-core/appc-common-bundle/src/test/java/org/onap/appc/cache/impl/LRUCacheTest.java
@@ -6,6 +6,8 @@
* ================================================================================
* Copyright (C) 2017 Amdocs
* =============================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * =============================================================================
* 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
@@ -23,17 +25,24 @@
package org.onap.appc.cache.impl;
+import java.util.Map;
+
import org.junit.Assert;
+import org.junit.Before;
import org.junit.Test;
import org.powermock.reflect.Whitebox;
-import java.util.Map;
-
public class LRUCacheTest {
+ private LRUCache cache;
+
+ @Before
+ public void setUp() {
+ cache = new LRUCache(20);
+ }
+
@Test
public void testConstructor() throws Exception {
- LRUCache cache = new LRUCache(20);
Map internalMap = Whitebox.getInternalState(cache, "map");
Assert.assertTrue(internalMap != null);
Assert.assertTrue(internalMap.size() == 0);
@@ -41,8 +50,6 @@ public class LRUCacheTest {
@Test
public void testGetAndPutObject() throws Exception {
- LRUCache cache = new LRUCache(20);
-
String key = "testing key";
Assert.assertTrue(cache.getObject(key) == null);