+ New in 2018.2
+
+
\ No newline at end of file
diff --git a/plugins/junit/test/com/intellij/execution/junit/codeInsight/JUnit5MalformedNestedClassTest.kt b/plugins/junit/test/com/intellij/execution/junit/codeInsight/JUnit5MalformedNestedClassTest.kt
new file mode 100644
index 000000000000..42e45688f65d
--- /dev/null
+++ b/plugins/junit/test/com/intellij/execution/junit/codeInsight/JUnit5MalformedNestedClassTest.kt
@@ -0,0 +1,32 @@
+// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+package com.intellij.execution.junit.codeInsight
+
+import com.intellij.codeInspection.InspectionProfileEntry
+import com.intellij.testFramework.LightProjectDescriptor
+import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
+import com.siyeh.ig.LightInspectionTestCase
+
+class JUnit5MalformedNestedClassTest : LightInspectionTestCase() {
+ override fun getInspection(): InspectionProfileEntry? {
+ return JUnit5MalformedNestedClassInspection()
+ }
+
+ @Throws(Exception::class)
+ override fun setUp() {
+ super.setUp()
+ addEnvironmentClass("package org.junit.jupiter.api;" +
+ "public @interface Nested {}")
+ }
+
+ fun testMalformed() {
+ doTest()
+ }
+
+ override fun getBasePath(): String {
+ return "/plugins/junit/testData/codeInsight/malformedNested"
+ }
+
+ override fun getProjectDescriptor(): LightProjectDescriptor {
+ return LightCodeInsightFixtureTestCase.JAVA_8
+ }
+}
diff --git a/plugins/junit/testData/codeInsight/malformedNested/Malformed.java b/plugins/junit/testData/codeInsight/malformedNested/Malformed.java
new file mode 100644
index 000000000000..1e581400107a
--- /dev/null
+++ b/plugins/junit/testData/codeInsight/malformedNested/Malformed.java
@@ -0,0 +1,4 @@
+class A {
+ @org.junit.jupiter.api.Nested
+ static class