summaryrefslogtreecommitdiffstats
path: root/cadi/core/src/test
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-10-15 08:19:50 -0500
committerInstrumental <jonathan.gathman@att.com>2019-10-15 08:35:35 -0500
commit1296352d8eafee57f982a4342ad79ada4aa56d28 (patch)
tree355cdb89d85530a861319f892b0f24236e6adc50 /cadi/core/src/test
parentbdce7667a6e272e2fa32e298d957a0d9090c5bc9 (diff)
Sonar Fixes, Formatting
Issue-ID: AAF-1019 Change-Id: Ica49d9e7323aad9622ff9d95cc21b87430c22c54 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi/core/src/test')
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MapBathConverter.java40
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_RegistrationPropHolder.java26
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfo.java22
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfoC.java8
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_PathFilter.java16
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_ConfigPrincipal.java12
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java12
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_BasicPrincipal.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_CachedBasicPrincipal.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_Kind.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_OAuth2FormPrincipal.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_StringTagLookup.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TaggedPrincipal.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TrustPrincipal.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_UnAuthPrincipal.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/basic/test/JU_BasicHttpTafResp.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTafResp.java2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_AbsTafResp.java10
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java34
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_NullTaf.java20
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_PuntTafResp.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustNotTafResp.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustTafResp.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AES.java8
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_BufferedCadiWrap.java2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CadiException.java14
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CadiWrap.java52
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Capacitor.java8
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Hash.java10
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_LocatorException.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java12
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java8
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Symm.java6
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_User.java32
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_CSV.java16
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Chmod.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_FQI.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_JsonOutputStream.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_MaskFormatException.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_NetMask.java12
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Split.java6
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_SubStandardConsole.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_TheConsole.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java20
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSEParser.java20
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_XReader.java4
51 files changed, 262 insertions, 262 deletions
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java
index b275790c..270a4af5 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_Get.java
@@ -95,7 +95,7 @@ public class JU_Get {
@SuppressWarnings("unused")
private String thrower = null;
- public TestBean() { }
+ public TestBean() { }
public String getProperty1() { return property1; }
public void setProperty1(final String value) { this.property1 = value; }
public String getProperty2() { return property2; }
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MapBathConverter.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MapBathConverter.java
index 2be51ece..7ea8e6fc 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MapBathConverter.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_MapBathConverter.java
@@ -7,9 +7,9 @@
* 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.
@@ -45,7 +45,7 @@ import junit.framework.Assert;
/**
* Test a simple Migration conversion tool for CADI
- *
+ *
* @author Instrumental(Jonathan)
*
*/
@@ -62,19 +62,19 @@ public class JU_MapBathConverter {
public static void createFile() throws IOException {
// Note, you cate a "MapBathConverter" by access to a File.
// We will create that file now. Local is fine.
- csv = new CSV(access,"JU_MapBathConverter.csv");
+ csv = new CSV(access,"JU_MapBathConverter.csv");
}
-
+
@BeforeClass
public static void beforeClass() {
expected = new ArrayList<>();
}
-
+
@Before
public void before() {
expected.clear();
}
-
+
@Test
public void test() throws IOException, CadiException {
CSV.Writer cw = csv.writer();
@@ -88,14 +88,14 @@ public class JU_MapBathConverter {
// Style 1 - Incoming ID/pass, create new cred with NweID and same Pass
cw.row(exp(bath(OLD_ID,SHARED_PASS)), exp(NEW_USER_SOMETHING_ORG),sdf.format(gc.getTime()));
// the response should be Basic with NEW_ID and OLD_PASS
-
+
// Style 2
cw.row(exp(bath(OLD_ID,"OLD_PASS")), exp(bath(NEW_USER_SOMETHING_ORG,"NEW_PASS")),sdf.format(gc.getTime()));
} finally {
cw.close();
}
-
+
final Iterator<String> exp = expected.iterator();
csv.visit(new Visitor() {
@Override
@@ -120,7 +120,7 @@ public class JU_MapBathConverter {
}
}
});
-
+
MapBathConverter mbc = new MapBathConverter(access, csv);
// Check no lookup just returns the same
@@ -128,12 +128,12 @@ public class JU_MapBathConverter {
Iterator<String> exp1 = expected.iterator();
// there's no passwords in CSV
- String old = exp1.next();
+ String old = exp1.next();
String nw = exp1.next();
Assert.assertEquals(nw, mbc.convert(access,old));
-
+
Assert.assertEquals(bath(NEW_USER_SOMETHING_ORG,SHARED_PASS), mbc.convert(access,bath(OLD_ID,SHARED_PASS)));
-
+
// Style 1 (new cred, old password)
old = exp1.next();
nw = bath(exp1.next(),SHARED_PASS);
@@ -162,7 +162,7 @@ public class JU_MapBathConverter {
} finally {
cw.close();
}
-
+
try {
new MapBathConverter(access, csv);
Assert.fail("Invalid Data should throw Exception");
@@ -184,7 +184,7 @@ public class JU_MapBathConverter {
} finally {
cw.close();
}
-
+
try {
new MapBathConverter(access, csv);
Assert.fail("file with too few rows should throw exception");
@@ -205,7 +205,7 @@ public class JU_MapBathConverter {
Assert.assertTrue("Correctly thrown Exception",true);
}
}
-
+
@Test
public void testBadRows() throws IOException {
try {
@@ -215,7 +215,7 @@ public class JU_MapBathConverter {
} finally {
cw.close();
}
-
+
try {
new MapBathConverter(access,csv);
Assert.fail("Non Existent File should throw exception");
@@ -225,11 +225,11 @@ public class JU_MapBathConverter {
} finally {
csv.delete();
}
-
- // Check for deletion
+
+ // Check for deletion
Assert.assertFalse(csv.toString() + "should have been deleted",new File(csv.toString()).exists());
}
-
+
private String bath(String user, String password) throws IOException {
StringBuilder sb = new StringBuilder(user);
sb.append(':');
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_RegistrationPropHolder.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_RegistrationPropHolder.java
index 1fe6a753..3b3461c1 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_RegistrationPropHolder.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_RegistrationPropHolder.java
@@ -7,9 +7,9 @@
* 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.
@@ -46,10 +46,10 @@ public class JU_RegistrationPropHolder {
rph = new RegistrationPropHolder(pa,20);
} catch (CadiException e) {
Assert.assertEquals(
- "\ncadi_latitude must be defined." +
+ "\ncadi_latitude must be defined." +
"\ncadi_longitude must be defined.",e.getMessage());
}
-
+
try {
pa.setProperty(Config.CADI_LATITUDE, "32.7");
rph = new RegistrationPropHolder(pa,20);
@@ -57,10 +57,10 @@ public class JU_RegistrationPropHolder {
Assert.assertEquals(
"\ncadi_longitude must be defined.",e.getMessage());
}
-
+
pa.setProperty(Config.CADI_LONGITUDE, "-72.0");
rph = new RegistrationPropHolder(pa,ju_port);
-
+
////////////////
// Validate Default Properties
////////////////
@@ -107,21 +107,21 @@ public class JU_RegistrationPropHolder {
final String url = "https://aaf.osaaf.org:8095/org.osaaf.aaf.service:2.1";
String name="theName";
assertEquals(url,rph.replacements(getClass().getSimpleName(),url, name, ""));
-
+
String alu = "aaf.osaaf.org:8095";
String curl = url.replace(alu, Config.AAF_LOCATE_URL_TAG);
pa.setProperty(Config.AAF_LOCATE_URL,"https://"+alu);
assertEquals(url.replace("8095","8095/locate"),rph.replacements(getClass().getSimpleName(),curl, name, ""));
-
+
String root_ns = "org.osaaf.aaf";
curl = url.replace(root_ns, "AAF_NS");
pa.setProperty(Config.AAF_ROOT_NS,root_ns);
assertEquals(url,rph.replacements(getClass().getSimpleName(),curl, name, ""));
-
+
curl = url.replace(root_ns, "%AAF_NS");
pa.setProperty(Config.AAF_ROOT_NS,root_ns);
assertEquals(url,rph.replacements(getClass().getSimpleName(),curl, name, ""));
-
+
final String fqdn = "%C.%CNS.%NS.%N";
String target = "myns.theName";
assertEquals(target,rph.replacements(getClass().getSimpleName(),fqdn, name, ""));
@@ -129,11 +129,11 @@ public class JU_RegistrationPropHolder {
pa.setProperty(Config.AAF_LOCATOR_CONTAINER_NS+".hello", "mycontns");
target = "mycontns.myns.theName";
assertEquals(target,rph.replacements(getClass().getSimpleName(),fqdn, name, ".hello"));
-
+
pa.setProperty(Config.AAF_LOCATOR_CONTAINER+".hello","helloC");
target = "helloC.mycontns.myns.theName";
assertEquals(target,rph.replacements(getClass().getSimpleName(),fqdn, name, ".hello"));
-
+
pa.setProperty(Config.AAF_LOCATOR_CONTAINER_NS,"c_ns");
target = "c_ns.myns.theName";
assertEquals(target,rph.replacements(getClass().getSimpleName(),fqdn, name, ""));
@@ -144,6 +144,6 @@ public class JU_RegistrationPropHolder {
Assert.fail();
}
}
-
+
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfo.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfo.java
index 98c1a292..7d34aab7 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfo.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfo.java
@@ -7,9 +7,9 @@
* 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.
@@ -45,16 +45,16 @@ import org.onap.aaf.cadi.config.Config;
import org.onap.aaf.cadi.config.SecurityInfo;
public class JU_SecurityInfo {
-
+
private static PropAccess access;
-
+
private static final String keyStoreFileName = "src/test/resources/keystore.p12";
private static final String keyStorePassword = "Password for the keystore";
private static final String keyPassword = "Password for the key";
-
+
private static final String trustStoreFileName = "src/test/resources/truststore.jks";
private static final String trustStorePasswd = "Password for the truststore";
-
+
@BeforeClass
public static void setupOnce() throws NoSuchAlgorithmException, CertificateException, IOException, KeyStoreException {
KeyStore keyStore = KeyStore.getInstance("PKCS12");
@@ -65,7 +65,7 @@ public class JU_SecurityInfo {
trustStore.load(null, null);
trustStore.store(new FileOutputStream(trustStoreFileName), trustStorePasswd.toCharArray());
}
-
+
@Before
public void setup() throws IOException {
access = new PropAccess(new PrintStream(new ByteArrayOutputStream()), new String[0]);
@@ -73,7 +73,7 @@ public class JU_SecurityInfo {
access.setProperty(Config.CADI_KEYSTORE, keyStoreFileName);
access.setProperty(Config.CADI_KEYSTORE_PASSWORD, access.encrypt(keyStorePassword));
access.setProperty(Config.CADI_KEY_PASSWORD, access.encrypt(keyPassword));
-
+
access.setProperty(Config.CADI_TRUSTSTORE, trustStoreFileName);
access.setProperty(Config.CADI_TRUSTSTORE_PASSWORD, access.encrypt(trustStorePasswd));
}
@@ -97,7 +97,7 @@ public class JU_SecurityInfo {
assertNotNull(si.getSSLSocketFactory());
assertNotNull(si.getSSLContext());
assertNotNull(si.getKeyManagers());
-
+
access.setProperty(Config.CADI_TRUST_MASKS, "123.123.123.123");
si = new SecurityInfo(access);
}
@@ -115,8 +115,8 @@ public class JU_SecurityInfo {
@SuppressWarnings("unused")
SecurityInfo si = new SecurityInfo(access);
}
-
-
+
+
@Test(expected = NumberFormatException.class)
public void badTrustMaskTest() throws CadiException {
access.setProperty(Config.CADI_TRUST_MASKS, "trustMask");
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfoC.java b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfoC.java
index da99f9ac..6826c2fb 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfoC.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/config/test/JU_SecurityInfoC.java
@@ -75,7 +75,7 @@ public class JU_SecurityInfoC {
// SecurityInfoC<HttpURLConnection> siClone = SecurityInfoC.instance(new PropAccess(), HttpURLConnection.class);
// assertThat(siClone, is(si));
// }
-
+
@Test
public void setTest() throws MalformedURLException, CadiException {
SecurityInfoC<HttpURLConnectionStub> si = SecurityInfoC.instance(new PropAccess(), HttpURLConnectionStub.class);
@@ -95,9 +95,9 @@ public class JU_SecurityInfoC {
}
public static class HttpURLConnectionStub extends HttpURLConnection {
- public HttpURLConnectionStub() throws MalformedURLException { super(new URL("http://www.example.com")); }
- @Override public void disconnect() { }
- @Override public boolean usingProxy() { return false; }
+ public HttpURLConnectionStub() throws MalformedURLException { super(new URL("http://www.example.com")); }
+ @Override public void disconnect() { }
+ @Override public boolean usingProxy() { return false; }
@Override public void connect() throws IOException { }
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_PathFilter.java b/cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_PathFilter.java
index 78b0fbc6..418fa1eb 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_PathFilter.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/filter/test/JU_PathFilter.java
@@ -48,16 +48,16 @@ import org.onap.aaf.cadi.config.Config;
import org.onap.aaf.cadi.filter.PathFilter;
public class JU_PathFilter {
-
+
private PropAccess access;
-
+
@Mock private FilterConfig filterConfigMock;
@Mock private ServletContext contextMock;
@Mock private HttpServletRequest reqMock;
@Mock private HttpServletResponse respMock;
@Mock private FilterChain chainMock;
@Mock private Principal princMock;
-
+
@Before
public void setup() {
MockitoAnnotations.initMocks(this);
@@ -77,28 +77,28 @@ public class JU_PathFilter {
} catch (ServletException e) {
assertThat(e.getMessage(), is("PathFilter - pathfilter_ns is not set"));
}
-
+
when(contextMock.getAttribute(Config.PATHFILTER_NS)).thenReturn(5);
when(contextMock.getAttribute(Config.PATHFILTER_STACK)).thenReturn(5);
when(contextMock.getAttribute(Config.PATHFILTER_URLPATTERN)).thenReturn(5);
when(contextMock.getAttribute(Config.PATHFILTER_NOT_AUTHORIZED_MSG)).thenReturn(5);
pathFilter.init(filterConfigMock);
-
+
pathFilter.doFilter(reqMock, respMock, chainMock);
when(reqMock.isUserInRole(anyString())).thenReturn(true);
pathFilter.doFilter(reqMock, respMock, chainMock);
-
+
pathFilter.destroy();
pathFilter = new PathFilter();
pathFilter.init(filterConfigMock);
-
+
pathFilter.doFilter(reqMock, respMock, chainMock);
when(reqMock.isUserInRole(anyString())).thenReturn(false);
pathFilter.doFilter(reqMock, respMock, chainMock);
-
+
pathFilter.destroy();
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_ConfigPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_ConfigPrincipal.java
index b37a38a1..22525419 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_ConfigPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_ConfigPrincipal.java
@@ -7,9 +7,9 @@
* * 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.
@@ -40,7 +40,7 @@ public class JU_ConfigPrincipal {
private final String b64encoded = "VXNlcjpwYXNz";
private Field content_field;
-
+
@Before
public void setup() throws NoSuchFieldException {
content_field = ConfigPrincipal.class.getDeclaredField("content");
@@ -50,7 +50,7 @@ public class JU_ConfigPrincipal {
@Test
public void testConfigPrincipalStringString() throws IOException, IllegalArgumentException, IllegalAccessException {
ConfigPrincipal p = new ConfigPrincipal(name, pass);
-
+
assertThat(p.getName(), is(name));
assertThat(p.toString(), is(name));
assertThat(p.getCred(), is(pass.getBytes()));
@@ -65,7 +65,7 @@ public class JU_ConfigPrincipal {
@Test
public void testConfigPrincipalStringByteArray() throws IOException, IllegalArgumentException, IllegalAccessException {
ConfigPrincipal p = new ConfigPrincipal(name, pass.getBytes());
-
+
assertThat(p.getName(), is(name));
assertThat(p.toString(), is(name));
assertThat(p.getCred(), is(pass.getBytes()));
@@ -76,5 +76,5 @@ public class JU_ConfigPrincipal {
// One more time for coverage purposes
assertThat(p.getAsBasicAuthHeader(), is("Basic " + b64encoded));
}
-
+
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java
index 9ed5fd1e..c3e5cb67 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/lur/test/JU_LocalLur.java
@@ -104,14 +104,14 @@ public class JU_LocalLur {
info = lur.dumpInfo();
assertThat(info.size(), is(1));
assertThat(info.get(0).user, is("user1@domain"));
-
+
when(permMock.getKey()).thenReturn("groupA");
assertThat(lur.handlesExclusively(permMock), is(true));
when(permMock.getKey()).thenReturn("groupB");
assertThat(lur.handlesExclusively(permMock), is(false));
-
+
assertThat(lur.fish(null, null), is(false));
-
+
Principal princ = new ConfigPrincipal("user1@localized", encrypted);
lur = new LocalLur(access, "user1@localized%" + password + ":groupA", null);
@@ -124,9 +124,9 @@ public class JU_LocalLur {
princ = new ConfigPrincipal("user1@localized", "badpass");
assertThat(lur.fish(princ, lur.createPerm("groupB")), is(false));
-
+
assertThat(lur.handles(null), is(false));
-
+
lur.fishAll(null, null);
List<Permission> perms = new ArrayList<>();
@@ -136,7 +136,7 @@ public class JU_LocalLur {
lur.fishAll(princ, perms);
princ = new ConfigPrincipal("user1@localized", "badpass");
lur.fishAll(princ, perms);
-
+
assertThat(lur.validate(null, null, null, null), is(false));
assertThat(lur.validate("user", null, "badpass".getBytes(), null), is(false));
assertThat(lur.validate("user1@localized", null, encrypted.getBytes(), null), is(false));
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_BasicPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_BasicPrincipal.java
index e67e096f..7356dbb7 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_BasicPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_BasicPrincipal.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_CachedBasicPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_CachedBasicPrincipal.java
index 5b780c9a..eb96a168 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_CachedBasicPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_CachedBasicPrincipal.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_Kind.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_Kind.java
index 04b9367b..b69eb3ec 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_Kind.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_Kind.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_OAuth2FormPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_OAuth2FormPrincipal.java
index c9623fb9..6ca74e27 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_OAuth2FormPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_OAuth2FormPrincipal.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_StringTagLookup.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_StringTagLookup.java
index a76e01f7..4ea3694c 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_StringTagLookup.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_StringTagLookup.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TaggedPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TaggedPrincipal.java
index 3dfe8d86..eb3afa35 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TaggedPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TaggedPrincipal.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TrustPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TrustPrincipal.java
index ed1ae4c9..1162b0eb 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TrustPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_TrustPrincipal.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_UnAuthPrincipal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_UnAuthPrincipal.java
index 60fc88e2..efba241c 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_UnAuthPrincipal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_UnAuthPrincipal.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java
index ea45c128..6e02988b 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/principal/test/JU_X509Principal.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/basic/test/JU_BasicHttpTafResp.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/basic/test/JU_BasicHttpTafResp.java
index 641545ca..35a27e45 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/basic/test/JU_BasicHttpTafResp.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/basic/test/JU_BasicHttpTafResp.java
@@ -7,9 +7,9 @@
* 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java
index 47d8f8d1..7154ab60 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTaf.java
@@ -68,7 +68,7 @@ public class JU_DenialOfServiceTaf {
private File dosIDFile;
private File dosDir;
private final String dosDirName = "test";
-
+
private final String id1 = "id1";
private final String id2 = "id2";
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTafResp.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTafResp.java
index b9b7b16d..034e974e 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTafResp.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/dos/test/JU_DenialOfServiceTafResp.java
@@ -1,5 +1,5 @@
/**
- *
+ *
* ============LICENSE_START====================================================
* org.onap.aaf
* ===========================================================================
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_AbsTafResp.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_AbsTafResp.java
index 4dba8edb..86ecb903 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_AbsTafResp.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_AbsTafResp.java
@@ -7,9 +7,9 @@
* * 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.
@@ -39,15 +39,15 @@ import org.onap.aaf.cadi.taf.AbsTafResp;
import org.onap.aaf.cadi.taf.TafResp.RESP;
public class JU_AbsTafResp {
-
+
private static final String JUNIT = "Junit";
private static final String name = "name";
private static final String tag = "tag";
private static final String description = "description";
-
+
private Access access;
private TaggedPrincipal taggedPrinc;
-
+
@Before
public void setup() {
access = new PropAccess(new PrintStream(new ByteArrayOutputStream()), new String[0]);
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java
index 8e103893..0e988f2d 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_EpiTaf.java
@@ -7,9 +7,9 @@
* * 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.
@@ -71,16 +71,16 @@ public class JU_EpiTaf {
}
class TryAnotherTafResp implements TafResp {
- @Override public boolean isValid() { return false; }
- @Override public String desc() { return null; }
- @Override public RESP isAuthenticated() { return RESP.TRY_ANOTHER_TAF; }
- @Override public RESP authenticate() throws IOException { return null; }
- @Override public TaggedPrincipal getPrincipal() { return null; }
+ @Override public boolean isValid() { return false; }
+ @Override public String desc() { return null; }
+ @Override public RESP isAuthenticated() { return RESP.TRY_ANOTHER_TAF; }
+ @Override public RESP authenticate() throws IOException { return null; }
+ @Override public TaggedPrincipal getPrincipal() { return null; }
@Override public String getTarget() {return "unknown";}
- @Override public Access getAccess() { return null; }
+ @Override public Access getAccess() { return null; }
@Override public boolean isFailedAttempt() { return false; }
@Override public float timing() { return 0; }
- @Override public void timing(long start) {}
+ @Override public void timing(long start) {}
@Override public String taf() {return "JUnit";}
}
@@ -89,16 +89,16 @@ public class JU_EpiTaf {
}
class TryAuthenticatingResp implements TafResp {
- @Override public boolean isValid() { return false; }
- @Override public String desc() { return null; }
- @Override public RESP isAuthenticated() { return RESP.TRY_AUTHENTICATING; }
- @Override public RESP authenticate() throws IOException { return null; }
- @Override public TaggedPrincipal getPrincipal() { return null; }
+ @Override public boolean isValid() { return false; }
+ @Override public String desc() { return null; }
+ @Override public RESP isAuthenticated() { return RESP.TRY_AUTHENTICATING; }
+ @Override public RESP authenticate() throws IOException { return null; }
+ @Override public TaggedPrincipal getPrincipal() { return null; }
@Override public String getTarget() {return "unknown";}
- @Override public Access getAccess() { return null; }
- @Override public boolean isFailedAttempt() { return false; }
+ @Override public Access getAccess() { return null; }
+ @Override public boolean isFailedAttempt() { return false; }
@Override public float timing() { return 0; }
- @Override public void timing(long start) {}
+ @Override public void timing(long start) {}
@Override public String taf() {return "JUnit";}
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_NullTaf.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_NullTaf.java
index fdb152c0..df9404af 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_NullTaf.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_NullTaf.java
@@ -7,9 +7,9 @@
* * 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.
@@ -43,21 +43,21 @@ public class JU_NullTaf {
TafResp singleton1 = nt.validate(null);
TafResp singleton2 = nt.validate(null, null, null);
Resp singleton3 = nt.revalidate(null, null);
-
+
assertThat(singleton1, is(singleton2));
-
+
assertFalse(singleton1.isValid());
-
+
assertThat(singleton1.isAuthenticated(), is(RESP.NO_FURTHER_PROCESSING));
-
+
assertThat(singleton1.desc(), is("All Authentication denied"));
-
+
assertThat(singleton1.authenticate(), is(RESP.NO_FURTHER_PROCESSING));
-
+
assertThat(singleton1.getPrincipal(), is(nullValue()));
-
+
assertThat(singleton1.getAccess(), is(Access.NULL));
-
+
assertTrue(singleton1.isFailedAttempt());
assertThat(singleton3, is(Resp.NOT_MINE));
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_PuntTafResp.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_PuntTafResp.java
index 316678ec..8b918321 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_PuntTafResp.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_PuntTafResp.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustNotTafResp.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustNotTafResp.java
index 4b28d6a4..770d8931 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustNotTafResp.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustNotTafResp.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustTafResp.java b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustTafResp.java
index 5a23062d..7bbc950f 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustTafResp.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/taf/test/JU_TrustTafResp.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AES.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AES.java
index a3e0db0d..72dfc3e8 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AES.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AES.java
@@ -86,7 +86,7 @@ public class JU_AES {
byte[] encrypted = aes.encrypt(orig.getBytes());
byte[] decrypted = aes.decrypt(encrypted);
assertThat(new String(decrypted), is(orig));
-
+
Field aeskeySpec_field = AES.class.getDeclaredField("aeskeySpec");
aeskeySpec_field.setAccessible(true);
aeskeySpec_field.set(aes, null);
@@ -122,7 +122,7 @@ public class JU_AES {
CipherInputStream cisEncrypt;
CipherInputStream cisDecrypt;
-
+
// Test CipherInputStream
baisEncrypt = new ByteArrayInputStream(orig.getBytes());
cisEncrypt = aes.inputStream(baisEncrypt, true);
@@ -157,7 +157,7 @@ public class JU_AES {
CipherOutputStream cosEncrypt;
CipherOutputStream cosDecrypt;
-
+
// Test CipherOutputStream
baisEncrypt = new ByteArrayInputStream(orig.getBytes());
baosEncrypt = new ByteArrayOutputStream();
@@ -191,5 +191,5 @@ public class JU_AES {
os.write(buffer, 0, len);
}
}
-
+
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_BufferedCadiWrap.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_BufferedCadiWrap.java
index 2146205a..b0c0dca7 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_BufferedCadiWrap.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_BufferedCadiWrap.java
@@ -31,7 +31,7 @@ import org.mockito.MockitoAnnotations;
public class JU_BufferedCadiWrap {
@Mock
private HttpServletRequest request;
-
+
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CadiException.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CadiException.java
index 294bb867..2aff33de 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CadiException.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CadiException.java
@@ -7,9 +7,9 @@
* * 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.
@@ -33,7 +33,7 @@ public class JU_CadiException {
@Test
public void testCadiException() {
CadiException exception = new CadiException();
-
+
assertNotNull(exception);
}
@@ -58,11 +58,11 @@ public class JU_CadiException {
assertThat(exception.getMessage(), is("New Exception"));
}
-
+
@Test
public void testCadiException1() {
CadiException exception = new CadiException();
-
+
assertNotNull(exception);
}
@@ -87,11 +87,11 @@ public class JU_CadiException {
assertThat(exception.getMessage(), is("New Exception"));
}
-
+
@Test
public void testCadiException2() {
CadiException exception = new CadiException();
-
+
assertNotNull(exception);
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CadiWrap.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CadiWrap.java
index 4f31a8f4..5f97481f 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CadiWrap.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CadiWrap.java
@@ -7,9 +7,9 @@
* * 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.
@@ -52,13 +52,13 @@ import org.onap.aaf.cadi.principal.TaggedPrincipal;
import org.onap.aaf.cadi.taf.TafResp;
public class JU_CadiWrap {
-
+
@Mock
private HttpServletRequest request;
-
+
@Mock
private TafResp tafResp;
-
+
@Mock
private TaggedPrincipal principle;
@@ -82,35 +82,35 @@ public class JU_CadiWrap {
public void testInstantiate() throws CadiException {
Access a = new PropAccess();
when(tafResp.getAccess()).thenReturn(a);
-
+
lur.fishAll(isA(Principal.class), (List<Permission>)isA(List.class));
-
+
EpiLur lur1 = new EpiLur(lur);
-
+
CadiWrap wrap = new CadiWrap(request, tafResp, lur1);
-
+
assertNull(wrap.getUserPrincipal());
assertNull(wrap.getRemoteUser());
assertNull(wrap.getUser());
assertEquals(wrap.getPermissions(principle).size(), 0);
assertTrue(wrap.access() instanceof PropAccess);
-
+
byte[] arr = {'1','2'};
wrap.setCred(arr);
-
+
assertEquals(arr, wrap.getCred());
-
+
wrap.setUser("User1");
assertEquals("User1", wrap.getUser());
-
+
wrap.invalidate("1");
assertFalse(wrap.isUserInRole(null));
-
+
wrap.set(tafResp, lur);
-
+
wrap.invalidate("2");
-
+
assertFalse(wrap.isUserInRole("User1"));
}
@@ -119,7 +119,7 @@ public class JU_CadiWrap {
Access a = new PropAccess();
when(tafResp.getAccess()).thenReturn(a);
when(tafResp.getPrincipal()).thenReturn(principle);
-
+
// Anonymous object for testing purposes
CachingLur<Permission> lur1 = new CachingLur<Permission>() {
@Override public Permission createPerm(String p) { return null; }
@@ -133,29 +133,29 @@ public class JU_CadiWrap {
@Override public void setDebug(String commaDelimIDsOrNull) { }
@Override public void clear(Principal p, StringBuilder sb) { }
};
-
+
MapPermConverter pc = new MapPermConverter();
-
+
CadiWrap wrap = new CadiWrap(request, tafResp, lur1, pc);
-
+
assertNotNull(wrap.getUserPrincipal());
assertNull(wrap.getRemoteUser());
assertNull(wrap.getUser());
-
+
byte[] arr = {'1','2'};
wrap.setCred(arr);
-
+
assertEquals(arr, wrap.getCred());
-
+
wrap.setUser("User1");
assertEquals("User1", wrap.getUser());
-
+
wrap.invalidate("1");
wrap.setPermConverter(new MapPermConverter());
-
+
assertTrue(wrap.getLur() instanceof CachingLur);
assertTrue(wrap.isUserInRole("User1"));
-
+
wrap.set(tafResp, lur);
assertFalse(wrap.isUserInRole("Perm1"));
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Capacitor.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Capacitor.java
index 4c842915..f03f2b6e 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Capacitor.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Capacitor.java
@@ -7,9 +7,9 @@
* * 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.
@@ -34,7 +34,7 @@ import java.lang.reflect.*;
public class JU_Capacitor {
private Capacitor cap;
- public final static String TEST_DATA =
+ public final static String TEST_DATA =
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" +
"cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc" +
@@ -122,7 +122,7 @@ public class JU_Capacitor {
for (int i = 0; i < c.length; i += read) {
read = cap.read(c, i, Math.min(3, c.length-i));
}
- assertEquals(b, new String(c));
+ assertEquals(b, new String(c));
}
@Test
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java
index 859f9a25..56b5538f 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_CmdLine.java
@@ -82,7 +82,7 @@ public class JU_CmdLine {
fis.close();
}
}
-
+
@After
public void restoreStreams() throws IOException {
System.setOut(System.out);
@@ -189,7 +189,7 @@ public class JU_CmdLine {
CmdLine.main(new String[]{"passgen", String.valueOf(length)});
output = outContent.toString().trim();
assertThat(output.length(), is(length));
-
+
length = 5;
outContent.reset();
CmdLine.main(new String[]{"passgen", String.valueOf(length)});
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Hash.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Hash.java
index 86d647e3..05abc7ed 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Hash.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Hash.java
@@ -7,9 +7,9 @@
* * 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.
@@ -208,11 +208,11 @@ public class JU_Hash {
assertEquals(new String(new byte[] {(byte)0x0A, (byte)0xB0}), new String(output));
assertNull(Hash.fromHexNo0x("~~"));
}
-//
+//
// @Test
// public void aaf_941() throws Exception {
// // User notes: From reported error "aaf" not coded right
-//
-//
+//
+//
// }
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_LocatorException.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_LocatorException.java
index bf79d74d..aa52225e 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_LocatorException.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_LocatorException.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java
index 9ab2c98d..abb3397b 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_PropAccess.java
@@ -7,9 +7,9 @@
* * 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.
@@ -39,10 +39,10 @@ import java.util.Properties;
@SuppressWarnings("unused")
public class JU_PropAccess {
- // Note: We can't actually get coverage of the protected constructor -
+ // Note: We can't actually get coverage of the protected constructor -
// that will be done later, when testing the child class "ServletContextAccess"
-
-
+
+
@Test
public void ConstructorTest() throws Exception {
PropAccess prop = new PropAccess();
@@ -82,7 +82,7 @@ public class JU_PropAccess {
ByteArrayInputStream bais = new ByteArrayInputStream(new byte[0]);
pa.load(bais);
}
-
+
@Test
public void specialConversionsTest() throws Exception {
// Coverage tests
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java
index 104923c7..827a86ed 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_ServletContextAccess.java
@@ -7,9 +7,9 @@
* * 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.
@@ -50,7 +50,7 @@ public class JU_ServletContextAccess {
private FilterConfig filter_mock;
Enumeration<String> enumeration;
-
+
private class CustomEnumeration implements Enumeration<String> {
private int idx = 0;
private final String[] elements = {"This", "is", "a", "test"};
@@ -70,7 +70,7 @@ public class JU_ServletContextAccess {
filter_mock = mock(FilterConfig.class);
when(filter_mock.getInitParameterNames()).thenReturn(enumeration);
}
-
+
@Test
public void logTest() throws Exception {
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Symm.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Symm.java
index 5e6f69b8..110f1034 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Symm.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_Symm.java
@@ -107,7 +107,7 @@ public class JU_Symm {
String orig = "I'm a password, really";
String b64encrypted;
String output;
-
+
ByteArrayOutputStream baosEncrypt = new ByteArrayOutputStream();
Symm.base64.encode(orig, baosEncrypt);
b64encrypted = new String(baosEncrypt.toByteArray());
@@ -126,7 +126,7 @@ public class JU_Symm {
String output;
byte[] prefix = "enc:".getBytes();
-
+
ByteArrayInputStream baisEncrypt = new ByteArrayInputStream(orig.getBytes());
ByteArrayOutputStream baosEncrypt = new ByteArrayOutputStream();
Symm.base64.encode(baisEncrypt, baosEncrypt, prefix);
@@ -209,5 +209,5 @@ public class JU_Symm {
assertTrue(e.getMessage().contains(" does not exist!"));
}
}
-
+
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_User.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_User.java
index 3df12f80..2bb9882f 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_User.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_User.java
@@ -7,9 +7,9 @@
* * 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.
@@ -55,16 +55,16 @@ public class JU_User {
@Mock
private Principal principal;
-
+
@Mock
private LocalPermission permission;
@Mock
private LocalPermission permission2;
-
+
@Before
public void setup() throws NoSuchFieldException, SecurityException {
MockitoAnnotations.initMocks(this);
-
+
when(principal.getName()).thenReturn("Principal");
when(permission.getKey()).thenReturn("NewKey");
@@ -98,7 +98,7 @@ public class JU_User {
assertThat((int)count_field.get(user), is(0));
assertThat(user.getCred(), is(cred.getBytes()));
}
-
+
@Test
public void constructorPrincipalIntervalTest() throws IllegalArgumentException, IllegalAccessException {
User<Permission> user = new User<Permission>(principal, 61 * SECOND);
@@ -133,7 +133,7 @@ public class JU_User {
user.resetCount();
assertThat((int)count_field.get(user), is(0));
}
-
+
@Test
public void permTest() throws InterruptedException, IllegalArgumentException, IllegalAccessException {
User<Permission> user = new User<Permission>(principal);
@@ -155,32 +155,32 @@ public class JU_User {
assertTrue(user.permsUnloaded());
assertTrue(user.noPerms());
}
-
+
@Test
public void addValuesToNewMapTest() {
User<Permission> user = new User<Permission>(principal);
Map<String, Permission> newMap = new HashMap<>();
-
+
assertFalse(user.contains(permission));
-
+
user.add(newMap, permission);
user.setMap(newMap);
-
+
assertTrue(user.contains(permission));
-
+
List<Permission> sink = new ArrayList<>();
user.copyPermsTo(sink);
-
+
assertThat(sink.size(), is(1));
assertTrue(sink.contains(permission));
-
+
assertThat(user.toString(), is("Principal|:NewKey"));
user.add(newMap, permission2);
user.setMap(newMap);
assertFalse(user.contains(permission2));
-
+
assertThat(user.toString(), is("Principal|:NewKey2,NewKey"));
}
-
+
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_CSV.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_CSV.java
index d4feac6f..1681f435 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_CSV.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_CSV.java
@@ -7,9 +7,9 @@
* 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.
@@ -52,7 +52,7 @@ public class JU_CSV {
filename = "Sample.csv";
file = new File(filename);
}
-
+
@After
public void end() {
if(file!=null) {
@@ -64,7 +64,7 @@ public class JU_CSV {
public static void before() {
expected = new ArrayList<>();
}
-
+
@Test
public void test() throws IOException, CadiException {
Access access = new PropAccess();
@@ -78,7 +78,7 @@ public class JU_CSV {
} catch(IOException e) {
Assert.assertTrue("CSV correctly created exception",true);
}
-
+
Writer writer = csv.writer();
try {
writer.row(add("\"hello\""));
@@ -89,7 +89,7 @@ public class JU_CSV {
} finally {
writer.close();
}
-
+
PrintStream garbage = new PrintStream(new FileOutputStream(file, true));
try {
garbage.println("# Ignore empty spaces, etc");
@@ -100,8 +100,8 @@ public class JU_CSV {
garbage.close();
}
-
- ////////////
+
+ ////////////
// Tests
////////////
final Holder<Integer> hi = new Holder<>(0);
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Chmod.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Chmod.java
index 6e93cc53..148f2e5c 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Chmod.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Chmod.java
@@ -6,9 +6,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_FQI.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_FQI.java
index 3daa6cb7..30a5f65c 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_FQI.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_FQI.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_JsonOutputStream.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_JsonOutputStream.java
index b3d7797c..2203b07f 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_JsonOutputStream.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_JsonOutputStream.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_MaskFormatException.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_MaskFormatException.java
index ba03b6b1..41ca0715 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_MaskFormatException.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_MaskFormatException.java
@@ -7,9 +7,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_NetMask.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_NetMask.java
index b37d03ae..3676e12e 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_NetMask.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_NetMask.java
@@ -6,9 +6,9 @@
* * 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.
@@ -39,25 +39,25 @@ public class JU_NetMask {
String test = "1.2.3.4";
assertEquals(NetMask.derive(test.getBytes()), 0);
}
-
+
@Test
public void deriveTest3() {
String test = "1.2.4";
assertEquals(NetMask.derive(test.getBytes()), 0);
}
-
+
@Test
public void deriveTest4() {
String test = "1.3.4";
assertEquals(NetMask.derive(test.getBytes()), 0);
}
-
+
@Test
public void deriveTest5() {
String test = "2.3.4";
assertEquals(NetMask.derive(test.getBytes()), 0);
}
-
+
@Test
public void deriveTest6() {
String test = "3.4";
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java
index e4f1e013..230c6b3b 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java
@@ -6,9 +6,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Split.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Split.java
index cbaa545b..fb2ed0ed 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Split.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Split.java
@@ -6,9 +6,9 @@
* * 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.
@@ -104,7 +104,7 @@ public class JU_Split {
assertThat(Split.splitTrim('c', null, 0).length, is(0));
}
-
+
@Test
public void coverageTest() {
@SuppressWarnings("unused")
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_SubStandardConsole.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_SubStandardConsole.java
index cff4b414..8c1597c0 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_SubStandardConsole.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_SubStandardConsole.java
@@ -6,9 +6,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_TheConsole.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_TheConsole.java
index da131255..ad63d5ad 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_TheConsole.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_TheConsole.java
@@ -6,9 +6,9 @@
* * 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.
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java
index f9c4cf73..0ddbb479 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java
@@ -6,9 +6,9 @@
* * 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.
@@ -30,7 +30,7 @@ import org.junit.Test;
import org.onap.aaf.cadi.util.Vars;
public class JU_Vars {
-
+
@Test
public void coverage() {
@SuppressWarnings("unused")
@@ -70,7 +70,7 @@ public class JU_Vars {
assertEquals(str,Vars.convert(holder,bstr="set %s to %s", "a","b"));
assertEquals("set a to b",holder.toString());
assertEquals(str,Vars.convert(null,bstr, "a","b"));
-
+
holder.setLength(0);
assertEquals(str = "%1=%2",Vars.convert(holder,str, "a","b"));
assertEquals("a=b",holder.toString());
@@ -79,7 +79,7 @@ public class JU_Vars {
assertEquals(str,Vars.convert(holder,bstr="%s=%s", "a","b"));
assertEquals("a=b",holder.toString());
assertEquals(str,Vars.convert(null,bstr, "a","b"));
-
+
holder.setLength(0);
assertEquals(str = "%1%2",Vars.convert(holder,str, "a","b"));
assertEquals("ab",holder.toString());
@@ -107,7 +107,7 @@ public class JU_Vars {
assertEquals(str=" %1%2%3 ",Vars.convert(holder,bstr = " %s%s%s ", "a","b","c","d","e","f","g","h","i","j"));
assertEquals(" abc ",holder.toString());
assertEquals(str,Vars.convert(null,bstr, "a","b","c","d","e","f","g","h","i","j"));
-
+
holder.setLength(0);
assertEquals(str = "set %1 to %2",Vars.convert(holder,str, "Something much","larger"));
@@ -122,8 +122,8 @@ public class JU_Vars {
assertEquals(str = "Text without Vars",Vars.convert(holder,str));
assertEquals(str,holder.toString());
assertEquals(str = "Text without Vars",Vars.convert(null,str));
-
-
+
+
holder.setLength(0);
assertEquals(str = "Not %1 Enough %2 Vars %3",Vars.convert(holder,str, "a","b"));
assertEquals("Not a Enough b Vars ",holder.toString());
@@ -143,7 +143,7 @@ public class JU_Vars {
str = "%1 !@#$%^*()-+?/,:;.";
assertEquals(str,Vars.convert(holder,bstr, "Not Acceptable"));
assertEquals("Not Acceptable !@#$%^*()-+?/,:;.",holder.toString());
- assertEquals(str ,Vars.convert(null,bstr, "Not Acceptable"));
+ assertEquals(str ,Vars.convert(null,bstr, "Not Acceptable"));
}
-
+
}
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSEParser.java b/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSEParser.java
index 5f880403..b9bd1268 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSEParser.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_WSSEParser.java
@@ -7,9 +7,9 @@
* * 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.
@@ -37,9 +37,9 @@ public class JU_WSSEParser {
// private String user;
// private byte[] password;
//
-// public void setUser(String user) { this.user = user; }
+// public void setUser(String user) { this.user = user; }
// public void setCred(byte[] passwd) { this.password = passwd; }
-// public String getUser() { return user; }
+// public String getUser() { return user; }
// public byte[] getCred() { return password; }
// };
@@ -58,7 +58,7 @@ public class JU_WSSEParser {
// System.out.println("CadiWrap credentials are: " + bc.getUser() + ", " + password);
// assertEquals("some_user", bc.getUser());
// assertEquals("some_password", password);
-//
+//
// } finally {
// fis.close();
// }
@@ -78,7 +78,7 @@ public class JU_WSSEParser {
// System.out.println("CadiWrap credentials are: " + bc.getUser() + ", " + password);
// assertEquals("none", bc.getUser());
// assertEquals("none", password);
-//
+//
// } finally {
// fis.close();
// }
@@ -121,8 +121,8 @@ public class JU_WSSEParser {
//
// e = wp.parse(bc, new ByteArrayInputStream("".getBytes())); // empty
// assertNotNull(e);
-//
-//
+//
+//
// long start, count = 0L;
// int iter = 30000;
// File f = new File("test/CBUSevent.xml");
@@ -146,9 +146,9 @@ public class JU_WSSEParser {
// }
// float ms = count/1000000f;
// System.out.println("Executed " + iter + " WSSE reads from Memory Stream in " + ms + "ms. " + ms/iter + "ms per trans");
-//
+//
// // SPECIFIC ISSUES
-//
+//
// fis = new FileInputStream("test/error2013_04_23.xml");
// try {
// bc.setCred(null);
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_XReader.java b/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_XReader.java
index 248f73b7..a88aecf5 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_XReader.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/wsse/test/JU_XReader.java
@@ -7,9 +7,9 @@
* * 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.