/*
 * Zed Attack Proxy (ZAP) and its related class files.
 *
 * ZAP is an HTTP/HTTPS proxy for assessing web application security.
 *
 * Copyright 2019 The ZAP Development Team
 *
 * 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.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.zaproxy.zap.extension.wappalyzer;

import static org.junit.jupiter.api.Assertions.fail;

import java.io.IOException;
import org.junit.jupiter.api.Test;

public class WappalyzerAppsJsonParseUnitTest {

    @Test
    public void test() throws IOException {
        // When - there's a parse exception, fail
        WappalyzerJsonParser parser =
                new WappalyzerJsonParser(
                        (pattern, e) -> fail("Regular expression with errors: " + e));
        parser.parseDefaultAppsJson();
    }
}

@@ -826,20 +826,28 @@
 ertions.
-fail
+assertEquals
 ;%0A%0Aimpor
@@ -869,16 +869,97 @@
 eption;%0A
+import java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.List;%0A
 import o
@@ -1103,46 +1103,76 @@
  // 
-When - there's a parse exception, fail
+Given%0A        List%3CString%3E errs = new ArrayList%3C%3E();%0A        // When
 %0A   
@@ -1251,132 +1251,154 @@
 ser(
-%0A                        (pattern, e) -%3E fail(%22Regular expression with errors: %22 + e));%0A        parser.parseDefaultAppsJson(
+(pattern, e) -%3E errs.add(e.toString()));%0A        parser.parseDefaultAppsJson();%0A        // Then%0A        assertEquals(Collections.emptyList(), errs
 );%0A 

Tweak UnitTest to collect all failing patterns