diff --git a/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java b/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java index 6e03ddcacee..8d408b83ee6 100644 --- a/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java +++ b/itests/org.openhab.binding.mielecloud.tests/src/main/java/org/openhab/binding/mielecloud/internal/handler/AbstractMieleThingHandlerTest.java @@ -27,6 +27,7 @@ import java.util.Optional; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; +import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.openhab.binding.mielecloud.internal.MieleCloudBindingConstants; @@ -366,6 +367,12 @@ public abstract class AbstractMieleThingHandlerTest extends JavaOSGiTest { */ protected abstract AbstractMieleThingHandler setUpThingHandler(); + @AfterEach + public void tearDownAbstractMieleThingHandlerTest() { + getThingRegistry().forceRemove(getThingHandler().getThing().getUID()); + getThingRegistry().forceRemove(getBridge().getUID()); + } + @Test public void testCachedStateIsQueriedOnInitialize() throws Exception { // given: