diff --git a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeToInvertibleUnitTest.java b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeToInvertibleUnitTest.java index dd6a1fe2d..3f60bec48 100644 --- a/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeToInvertibleUnitTest.java +++ b/bundles/org.openhab.core/src/test/java/org/openhab/core/library/types/QuantityTypeToInvertibleUnitTest.java @@ -125,6 +125,11 @@ class QuantityTypeToInvertibleUnitTest { assertEquals(0.1, v1.doubleValue(), 0.01); assertEquals(10, v2.doubleValue(), 0.01); + + // fail cases + assertNull(v1.toInvertibleUnit(SIUnits.METRE)); + assertNull(v2.toInvertibleUnit(SIUnits.METRE)); + assertNull(QuantityType.valueOf(5, Units.HERTZ).toInvertibleUnit(SIUnits.METRE)); } /**