@@ -0,0 +1,2095 @@
+/*%0A * Copyright 2017 Daniel Pedraza-Arcega%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.github.danzx.zekke.ws.rest.security.jwt.filter;%0A%0Aimport static org.assertj.core.api.Assertions.assertThatThrownBy;%0Aimport static org.assertj.core.api.Assertions.fail;%0A%0Aimport com.github.danzx.zekke.util.Strings;%0A%0Aimport junitparams.JUnitParamsRunner;%0Aimport junitparams.Parameters;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0A@RunWith(JUnitParamsRunner.class)%0Apublic class JwtHeaderExtractorTest %7B%0A%0A    @Test%0A    public void shouldExtractToken() %7B%0A        String expectedToken = %22aaaa.bbbb.cccc%22;%0A        String headerInfo = %22Bearer %22 + expectedToken;%0A        %0A        try %7B%0A            JwtHeaderExtractor.getToken(headerInfo);%0A        %7D catch (IllegalArgumentException ex) %7B%0A            fail(%22Shouldn't have failed%22, ex);%0A        %7D%0A    %7D%0A%0A    @Test%0A    @Parameters(method = %22headerInfos%22)%0A    public void shouldExtractTokenThrowIllegalArgumentException(String headerInfo) %7B%0A        assertThatThrownBy(() -%3E JwtHeaderExtractor.getToken(headerInfo)).isInstanceOf(IllegalArgumentException.class);%0A    %7D%0A%0A    protected Object%5B%5D%5B%5D headerInfos() %7B%0A        return new Object%5B%5D%5B%5D %7B%0A            %7B%22aaaa.bbbb.cccc%22%7D,%0A            %7B%22Beareraaaa.bbbb.cccc%22%7D,%0A            %7B%22NotBearer aaaa.bbbb.cccc%22%7D,%0A            %7B%22 Bearer aaaa.bbbb.cccc%22%7D,%0A            %7B%22BearerNot aaaa.bbbb.cccc%22%7D,%0A            %7B%22a random string%22%7D,%0A            %7Bnull%7D,%0A            %7BStrings.EMPTY%7D,%0A            %7BStrings.BLANK_SPACE%7D,%0A            %7BStrings.NEW_LINE%7D,%0A            %7BStrings.TAB%7D%0A        %7D;%0A    %7D%0A%7D%0A

Add JwtHeaderExtractorTest