diff --git a/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/.classpath b/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/.classpath
index 22230cf0d..da6b86478 100644
--- a/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/.classpath
+++ b/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/.classpath
@@ -1,5 +1,6 @@
+
@@ -8,5 +9,5 @@
-
+
diff --git a/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/.project b/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/.project
index 65f2d3ebc..5803584d2 100644
--- a/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/.project
+++ b/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/.project
@@ -10,8 +10,14 @@
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
diff --git a/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/pom.xml b/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/pom.xml
new file mode 100644
index 000000000..6ecc548d3
--- /dev/null
+++ b/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/pom.xml
@@ -0,0 +1,19 @@
+
+
+ 4.0.0
+ com.example
+ preview-junit
+ 1.0-SNAPSHOT
+
+ 17
+ 17
+
+
+
+ org.junit.jupiter
+ junit-jupiter
+ 5.14.0
+
+
+
diff --git a/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/src/main/java/example/AdditionalMainSource.java b/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/src/main/java/example/AdditionalMainSource.java
new file mode 100644
index 000000000..99da8fd79
--- /dev/null
+++ b/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/src/main/java/example/AdditionalMainSource.java
@@ -0,0 +1,4 @@
+package example;
+
+public class AdditionalMainSource {
+}
diff --git a/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/src/main/java/example/AdditionalMainSourceTest.java b/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/src/main/java/example/AdditionalMainSourceTest.java
new file mode 100644
index 000000000..05d2adcc4
--- /dev/null
+++ b/java-extension/com.microsoft.java.test.plugin.test/projects/preview-junit/src/main/java/example/AdditionalMainSourceTest.java
@@ -0,0 +1,10 @@
+package example;
+
+import org.junit.jupiter.api.Test;
+
+public class AdditionalMainSourceTest {
+
+ @Test
+ public void mainSourceTest() {
+ }
+}
diff --git a/java-extension/com.microsoft.java.test.plugin.test/src/com/microsoft/java/test/plugin/util/TestSearchUtilsTest.java b/java-extension/com.microsoft.java.test.plugin.test/src/com/microsoft/java/test/plugin/util/TestSearchUtilsTest.java
index f88fe4706..0e81795ed 100644
--- a/java-extension/com.microsoft.java.test.plugin.test/src/com/microsoft/java/test/plugin/util/TestSearchUtilsTest.java
+++ b/java-extension/com.microsoft.java.test.plugin.test/src/com/microsoft/java/test/plugin/util/TestSearchUtilsTest.java
@@ -16,7 +16,10 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+import java.lang.reflect.Field;
import java.util.Arrays;
+import java.util.Collections;
+import java.util.Collection;
import java.util.List;
import org.eclipse.core.resources.IProject;
@@ -81,7 +84,27 @@ public void testDiscoverJUnit5TestsWithOlderPreviewSource() throws Exception {
assertTrue(packages.get(0).getChildren().stream().anyMatch(item -> "MiniTest".equals(item.getLabel())));
assertTrue(packages.get(0).getChildren().stream().anyMatch(item -> "SiblingTest".equals(item.getLabel())));
assertTrue(packages.get(0).getChildren().stream().anyMatch(item -> "NestedOnlyTest".equals(item.getLabel())));
+ assertTrue(packages.get(0).getChildren().stream()
+ .noneMatch(item -> "AdditionalMainSourceTest".equals(item.getLabel())));
+ final String mainSourcePath = javaProject.getPackageFragmentRoot(project.getFolder("src/main/java"))
+ .getResource().getLocation().toOSString();
+ final List packagesWithAdditionalSource = TestSearchUtils.findTestPackagesAndTypes(
+ Arrays.