]> git.basschouten.com Git - openhab-addons.git/commitdiff
[knx] Fix warnings in test (#16434)
authorHolger Friedrich <mail@holger-friedrich.de>
Wed, 21 Feb 2024 18:24:28 +0000 (19:24 +0100)
committerGitHub <noreply@github.com>
Wed, 21 Feb 2024 18:24:28 +0000 (19:24 +0100)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
bundles/org.openhab.binding.knx/src/test/java/org/openhab/binding/knx/internal/channel/KNXChannelTest.java

index 00f702c3adf095dab6cf59c252dba083a2735a58..30fc1b069281df67a2acce3d4c2bc49dcbe9db8c 100644 (file)
@@ -197,7 +197,7 @@ class KNXChannelTest {
         Command command = new PercentType("90");
         @Nullable
         OutboundSpec outboundSpec = knxChannel.getCommandSpec(command);
-        assertThat(outboundSpec, is(notNullValue()));
+        assertNotNull(outboundSpec);
         assertThat(outboundSpec.getGroupAddress(), is(new GroupAddress("1/2/2")));
 
         String mappedValue = ValueEncoder.encode(outboundSpec.getValue(), outboundSpec.getDPT());
@@ -217,8 +217,9 @@ class KNXChannelTest {
         assertThat(knxChannel, instanceOf(TypeDimmer.class));
 
         Command command = OnOffType.ON;
+        @Nullable
         OutboundSpec outboundSpec = knxChannel.getCommandSpec(command);
-        assertThat(outboundSpec, is(notNullValue()));
+        assertNotNull(outboundSpec);
         assertThat(outboundSpec.getGroupAddress(), is(new GroupAddress("1/2/1")));
 
         String mappedValue = ValueEncoder.encode(outboundSpec.getValue(), outboundSpec.getDPT());