# 2026.1 Facets in unit tests incompatibility

**URL:** https://platform.jetbrains.com/t/2026-1-facets-in-unit-tests-incompatibility/3968
**Category:** IntelliJ Platform
**Created:** [March 29, 2026, 2:43am UTC](https://platform.jetbrains.com/t/2026-1-facets-in-unit-tests-incompatibility/3968 "2026-03-29T02:43:18Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![DenWav](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@DenWav](https://platform.jetbrains.com/u/DenWav)
#### Post date: [March 29, 2026, 2:43am UTC](https://platform.jetbrains.com/t/2026-1-facets-in-unit-tests-incompatibility/3968/1 "2026-03-29T02:43:18Z")

</div>

Trying to update my plugin for 2026.1 all of my tests fail [here](https://github.com/minecraft-dev/MinecraftDev/blob/dev/src/test/kotlin/framework/BaseMinecraftTest.kt#L63). The error is because my facet doesn’t exist:

```auto
Caused by: java.lang.NullPointerException: null cannot be cast to non-null type com.demonwav.mcdev.facet.MinecraftFacetType
	at com.demonwav.mcdev.facet.MinecraftFacet$Companion.getFacetType(MinecraftFacet.kt:255)
	at com.demonwav.mcdev.framework.BaseMinecraftTestKt$getProjectDescriptor$1.configureModule(BaseMinecraftTest.kt:63)
	at com.intellij.testFramework.LightProjectDescriptor.lambda$createContentEntry$2(LightProjectDescriptor.java:145)

```

The problem is my facet type is not registered, so my code trying to get my facet type always fails.

This issue is specific to 2026.1 but I can’t find any documentation or any indication of how I’m supposed to work around this. When I list all registered facet types, mine is nowhere to be found. Do I need to do something to force my facet type to load?

---

<div class="post-metadata">

### Author: ![DenWav](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@DenWav](https://platform.jetbrains.com/u/DenWav)
#### Post date: [March 29, 2026, 7:55pm UTC](https://platform.jetbrains.com/t/2026-1-facets-in-unit-tests-incompatibility/3968/3 "2026-03-29T19:55:53Z")

</div>

The issue is my plugin wasn’t loaded due to new bundled plugin dependency requirements.

I had to add `bundledPlugin("org.jetbrains.idea.reposearch")` for 2026.1 due to some changes in the Maven plugin.

This smoke test helped figure that out:

```kotlin
    @Test
    @Suppress("UnstableApiUsage")
    fun testPluginEnabled() {
        // This test helps to detect cases where some plugin(s) cannot be loaded.
        // One reason is that some major IDE versions include changes to plugin dependencies which cause
        // our plugin not to load in tests, often because they added a mandatory dependency not available by default.
        val loadingErrors = PluginManagerCore.getAndClearPluginLoadingErrors()
        Assertions.assertTrue(loadingErrors.isEmpty()) {
            loadingErrors.mapNotNull { it.reason }.joinToString("\n", "\n") { it.detailedMessage }
        }
    }

```
