Mass removal of all Tabs (Style Warnings)
[aaf/authz.git] / auth / auth-oauth / src / test / java / org / onap / aaf / auth / oauth / JU_OAuth2FilterTest.java
index 56dc669..56eba95 100644 (file)
@@ -38,51 +38,51 @@ import org.onap.aaf.cadi.principal.BearerPrincipal;
 
 public class JU_OAuth2FilterTest {
 
-       @Mock
-       private HttpServletRequest request;
-       @Mock
-       private FilterChain chain;
-       @Mock
-       private BearerPrincipal principal;
-
-       @Before
-       public void setup() {
-               initMocks(this);
-       }
-
-       @Test
-       public void testDoFilterWithContentType() throws IOException, ServletException {
-               when(request.getContentType()).thenReturn("application/x-www-form-urlencoded");
-
-               OAuth2Filter filter = new OAuth2Filter();
-               filter.doFilter(request, null, chain);
-
-               verify(chain, only()).doFilter(request, null);
-       }
-
-       @Test
-       public void testDoFilter() throws IOException, ServletException {
-               when(request.getContentType()).thenReturn("somethingElse");
-               when(request.getUserPrincipal()).thenReturn(principal);
-               when(request.getHeader("Authorization")).thenReturn("Bearer 1;Bearer2");
-
-               OAuth2Filter filter = new OAuth2Filter();
-               filter.init(null);
-               filter.destroy();
-               filter.doFilter(request, null, chain);
-
-               verify(chain, only()).doFilter(request, null);
-               verify(principal, only()).setBearer("1");
-       }
-
-       @Test
-       public void testDoFilterWithoutBearerPrincipal() throws IOException, ServletException {
-               when(request.getContentType()).thenReturn("somethingElse");
-               when(request.getHeader("Authorization")).thenReturn("Bearer 1;Bearer2");
-
-               OAuth2Filter filter = new OAuth2Filter();
-               filter.doFilter(request, null, chain);
-
-               verify(chain, only()).doFilter(request, null);
-       }
+    @Mock
+    private HttpServletRequest request;
+    @Mock
+    private FilterChain chain;
+    @Mock
+    private BearerPrincipal principal;
+
+    @Before
+    public void setup() {
+        initMocks(this);
+    }
+
+    @Test
+    public void testDoFilterWithContentType() throws IOException, ServletException {
+        when(request.getContentType()).thenReturn("application/x-www-form-urlencoded");
+
+        OAuth2Filter filter = new OAuth2Filter();
+        filter.doFilter(request, null, chain);
+
+        verify(chain, only()).doFilter(request, null);
+    }
+
+    @Test
+    public void testDoFilter() throws IOException, ServletException {
+        when(request.getContentType()).thenReturn("somethingElse");
+        when(request.getUserPrincipal()).thenReturn(principal);
+        when(request.getHeader("Authorization")).thenReturn("Bearer 1;Bearer2");
+
+        OAuth2Filter filter = new OAuth2Filter();
+        filter.init(null);
+        filter.destroy();
+        filter.doFilter(request, null, chain);
+
+        verify(chain, only()).doFilter(request, null);
+        verify(principal, only()).setBearer("1");
+    }
+
+    @Test
+    public void testDoFilterWithoutBearerPrincipal() throws IOException, ServletException {
+        when(request.getContentType()).thenReturn("somethingElse");
+        when(request.getHeader("Authorization")).thenReturn("Bearer 1;Bearer2");
+
+        OAuth2Filter filter = new OAuth2Filter();
+        filter.doFilter(request, null, chain);
+
+        verify(chain, only()).doFilter(request, null);
+    }
 }