@@ -0,0 +1,2377 @@
+/*%0A * Zed Attack Proxy (ZAP) and its related class files.%0A *%0A * ZAP is an HTTP/HTTPS proxy for assessing web application security.%0A *%0A * Copyright 2016 The ZAP development team%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 org.zaproxy.zap.extension.pscanrulesBeta;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport net.htmlparser.jericho.Source;%0A%0Aimport org.junit.Before;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mockito;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0Aimport org.parosproxy.paros.Constant;%0Aimport org.parosproxy.paros.core.scanner.Alert;%0Aimport org.parosproxy.paros.network.HttpMessage;%0Aimport org.zaproxy.zap.extension.alert.ExtensionAlert;%0Aimport org.zaproxy.zap.extension.pscan.PassiveScanThread;%0Aimport org.zaproxy.zap.extension.pscan.PluginPassiveScanner;%0Aimport org.zaproxy.zap.utils.I18N;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic abstract class PassiveScannerTest %7B%0A%0A    protected PluginPassiveScanner rule;%0A    protected PassiveScanThread parent;%0A    protected List%3CAlert%3E alertsRaised;%0A%0A    @BeforeClass%0A    public static void beforeClass() %7B%0A        Constant.messages = Mockito.mock(I18N.class);%0A    %7D%0A%0A    public PassiveScannerTest() %7B%0A        super();%0A    %7D%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        alertsRaised = new ArrayList%3C%3E();%0A        parent = new PassiveScanThread(null, null, new ExtensionAlert()) %7B%0A            @Override%0A            public void raiseAlert(int arg0, Alert arg1) %7B%0A                alertsRaised.add(arg1);%0A            %7D%0A        %7D;%0A        rule = createScanner();%0A        rule.setParent(parent);%0A    %7D%0A%0A    protected abstract PluginPassiveScanner createScanner();%0A    %0A    protected Source createSource(HttpMessage msg) %7B%0A        return new Source(msg.getResponseHeader().toString() + msg.getResponseBody().toString());%0A    %7D%0A%0A%7D

Add PassiveScannerTest abstract class