Sonar Fixes, Formatting
[aaf/authz.git] / cadi / client / src / test / java / org / onap / aaf / cadi / client / test / JU_AbsAuthentication.java
index 65daa7b..9c293c9 100644 (file)
@@ -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,20 +34,20 @@ import java.io.PrintStream;
 import java.net.HttpURLConnection;
 
 public class JU_AbsAuthentication {
-    
+
     private final static String ID = "id";
     private final static String PASSWORD = "password";
     private final static String WARNING = "Your service has 1000 consecutive bad service " +
                                             "logins to AAF. AAF Access will be disabled after 10000\n";
-    
+
     private static ByteArrayOutputStream errStream;
-    
+
     @Before
     public void setup() {
         errStream = new ByteArrayOutputStream();
         System.setErr(new PrintStream(errStream));
     }
-    
+
     @After
     public void tearDown() {
         System.setErr(System.err);
@@ -59,7 +59,7 @@ public class JU_AbsAuthentication {
         assertThat(stub.getID(), is(nullValue()));
         assertThat(stub.headValue(), is(""));
         assertThat(stub.count(), is(0));
-        
+
         stub.setUser(ID);
         assertThat(stub.getID(), is(ID));
 
@@ -67,7 +67,7 @@ public class JU_AbsAuthentication {
         assertThat(stub.getID(), is(ID));
         assertThat(stub.headValue(), is(PASSWORD));
         assertThat(stub.count(), is(0));
-        
+
         assertThat(stub.setLastResponse(200), is(0));
         assertThat(stub.isDenied(), is(false));
 
@@ -81,12 +81,12 @@ public class JU_AbsAuthentication {
         stub.setCount(999);
         assertThat(stub.setLastResponse(401), is(1000));
         assertThat(errStream.toString(), is(WARNING));
-        
+
         // coverage...
         stub.setLastMiss(1);
         assertThat(stub.isDenied(), is(false));
     }
-    
+
     private class AuthStub extends AbsAuthentication<HttpURLConnection> {
 
         public AuthStub(SecurityInfoC<HttpURLConnection> securityInfo, String user, byte[] headValue)
@@ -95,7 +95,7 @@ public class JU_AbsAuthentication {
         @Override public void setSecurity(HttpURLConnection client) throws CadiException { }
         @Override public void setUser(String id) { super.setUser(id); }
         @Override public String headValue() throws IOException { return super.headValue(); }
-        
+
         public void setLastMiss(long lastMiss) { this.lastMiss = lastMiss; }
         public void setCount(int count) { this.count = count; }
     }