diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonAfterImport.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonAfterImport.java
new file mode 100644
index 000000000000..cc76aa91f39e
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonAfterImport.java
@@ -0,0 +1,6 @@
+package foo;
+
+import java.util.List;
+;
+
+class Foo {}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonBeforeImport.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonBeforeImport.java
new file mode 100644
index 000000000000..52070e0576c9
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonBeforeImport.java
@@ -0,0 +1,6 @@
+package foo;
+
+;
+import java.util.List;
+
+class Foo {}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonBetweenImport.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonBetweenImport.java
new file mode 100644
index 000000000000..d4301ea6c0b2
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonBetweenImport.java
@@ -0,0 +1,7 @@
+package foo;
+
+import java.util.List;
+;
+import java.util.Date;
+
+class Foo {}
\ No newline at end of file
diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonWithoutImport.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonWithoutImport.java
new file mode 100644
index 000000000000..0de2d1abaaf4
--- /dev/null
+++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/semicolonHighlighting/SemicolonWithoutImport.java
@@ -0,0 +1,5 @@
+package foo;
+
+;
+
+class Foo {}
\ No newline at end of file
diff --git a/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/SemicolonHighlightingTest.kt b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/SemicolonHighlightingTest.kt
new file mode 100644
index 000000000000..a7f878900db9
--- /dev/null
+++ b/java/java-tests/testSrc/com/intellij/java/codeInsight/daemon/SemicolonHighlightingTest.kt
@@ -0,0 +1,24 @@
+// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
+package com.intellij.java.codeInsight.daemon
+
+import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase
+import com.intellij.pom.java.LanguageLevel
+
+class SemicolonHighlightingTest: LightDaemonAnalyzerTestCase() {
+ private val BASE_PATH = "/codeInsight/daemonCodeAnalyzer/semicolonHighlighting"
+
+ @Throws(Exception::class)
+ override fun setUp() {
+ super.setUp()
+ setLanguageLevel(LanguageLevel.JDK_21)
+ }
+
+ private fun doTest() {
+ doTest(BASE_PATH + "/" + getTestName(false) + ".java", false, false)
+ }
+
+ fun testSemicolonAfterImport() { doTest() }
+ fun testSemicolonBeforeImport() { doTest() }
+ fun testSemicolonBetweenImport() { doTest() }
+ fun testSemicolonWithoutImport() { doTest() }
+}
\ No newline at end of file