package io.github.lukehutch.fastclasspathscanner.test;

import static org.assertj.core.api.Assertions.assertThat;

import java.util.stream.Collectors;

import org.junit.Test;

import io.github.lukehutch.fastclasspathscanner.FastClasspathScanner;
import io.github.lukehutch.fastclasspathscanner.scanner.ScanResult;

public class Java8Test {
    @Test
    public void stream() throws Exception {
        final ScanResult scanResult = new FastClasspathScanner().scan();
        assertThat( //
                scanResult.getClassNameToClassInfo().values().stream()
                        .filter(c -> c.getClassName().contains("ClsSub")) //
                        .map(c -> c.getClassName()) //
                        .collect(Collectors.toSet())) //
                                .containsExactly("io.github.lukehutch.fastclasspathscanner.test.whitelisted.ClsSub",
                                        "io.github.lukehutch.fastclasspathscanner.test.whitelisted.ClsSubSub");
    }
}

@@ -306,16 +306,390 @@
 nResult;
+%0Aimport io.github.lukehutch.fastclasspathscanner.test.whitelisted.ClsSub;%0Aimport io.github.lukehutch.fastclasspathscanner.test.whitelisted.ClsSubSub;%0Aimport io.github.lukehutch.fastclasspathscanner.test.whitelisted.Iface;%0Aimport io.github.lukehutch.fastclasspathscanner.test.whitelisted.IfaceSub;%0Aimport io.github.lukehutch.fastclasspathscanner.test.whitelisted.IfaceSubSub;
 %0A%0Apublic
@@ -1170,42 +1170,193 @@
 tly(
-%22io.github.lukehutch.fastc
+ClsSub.class.getName(), ClsSubSub.class.getName());%0A    %7D%0A%0A    @Test%0A    public void streamHasSuperInterface() throws Exception %7B%0A        final ScanResult scanResult = new FastC
 lasspath
 scan
@@ -1355,151 +1355,489 @@
 path
-s
+S
 canner
-.test.whitelisted.ClsSub%22,%0A                                        %22io.github.lukehutch.fastclasspathscanner.test.whitelisted.ClsSubSub%22
+().scan();%0A        assertThat( //%0A                scanResult.getClassNameToClassInfo().values().stream() //%0A                        .filter(c -%3E c.isImplementedInterface()) //%0A                        .filter(c -%3E c.hasSuperinterface(Iface.class.getName())) //%0A                        .map(c -%3E c.getClassName()) //%0A                        .collect(Collectors.toSet())) //%0A                                .containsExactly(IfaceSub.class.getName(), IfaceSubSub.class.getName()
 );%0A 

Add a test