X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=auth%2Fauth-core%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Faaf%2Fauth%2Frserv%2Ftest%2FJU_CachingFileAccess.java;h=6d6e2da0f1ebb24e325b8bc5f95fd766cde37493;hb=82755753f41112e1cdd91b2994620ad074dfbf20;hp=207afc7053a9008382cec2e962f7f52067b6dc2d;hpb=4b5a7d721d994a49057e9bfb403c7bff1b376660;p=aaf%2Fauthz.git diff --git a/auth/auth-core/src/test/java/org/onap/aaf/auth/rserv/test/JU_CachingFileAccess.java b/auth/auth-core/src/test/java/org/onap/aaf/auth/rserv/test/JU_CachingFileAccess.java index 207afc70..6d6e2da0 100644 --- a/auth/auth-core/src/test/java/org/onap/aaf/auth/rserv/test/JU_CachingFileAccess.java +++ b/auth/auth-core/src/test/java/org/onap/aaf/auth/rserv/test/JU_CachingFileAccess.java @@ -19,17 +19,16 @@ * * * * ******************************************************************************/ + package org.onap.aaf.auth.rserv.test; import static org.mockito.Matchers.any; import static org.mockito.Matchers.anyString; -import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.io.File; -import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; import java.lang.reflect.Field; @@ -42,8 +41,6 @@ import javax.servlet.http.HttpServletResponse; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; import org.onap.aaf.auth.rserv.CachingFileAccess; import org.onap.aaf.auth.rserv.HttpCode; import org.onap.aaf.auth.rserv.Match; @@ -148,26 +145,6 @@ public class JU_CachingFileAccess { keyfile1.delete(); } - @Test - public void testLoadOrDefault() throws IOException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException, ClassNotFoundException, InstantiationException { - String filePath = "test/output_key"; - File keyfile = new File(filePath); - cachingFileAccess.loadOrDefault(trans, filePath, "-", null, null); - keyfile.delete(); - - Trans trans = mock(Trans.class); - - String filePath1 = "test/output_key.txt"; - //File keyfile1 = new File(filePath1); - doAnswer(new Answer() { - public Void answer(InvocationOnMock invocation) throws FileNotFoundException { - throw new FileNotFoundException(); - } - }).when(trans).info(); - //cachingFileAccess.loadOrDefault(trans, "bs", "also bs", "test", null); //TODO: Needs more testing AAF-111 - //keyfile1.delete(); - } - @Test public void testInvalidate() { //NavigableMap content = new ConcurrentSkipListMap<>();