From b06dde458783f0d00a12bed7a5b8fdbcf5a5efc5 Mon Sep 17 00:00:00 2001 From: Mariusz Pacek Date: Sat, 24 Oct 2026 05:14:58 +0200 Subject: [PATCH] test(commands): second boost keeps the first original after a panel change ADR-006 rule, now pinned by a test; the explaining comment is in CommandService.write. Co-Authored-By: Claude Sonnet 5.5 --- .../home/gateway/application/CommandServiceTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/java/home/gateway/application/CommandServiceTest.java b/src/test/java/home/gateway/application/CommandServiceTest.java index 2fe20d0..f608479 100644 --- a/src/test/java/home/gateway/application/CommandServiceTest.java +++ b/src/test/java/home/gateway/application/CommandServiceTest.java @@ -634,6 +634,17 @@ class CommandServiceTest { assertEquals(Status.REJECTED, service.apply(command("cwu_comfort", 40, null)).status()); } + @Test + void secondBoostKeepsTheFirstOriginalEvenIfThePanelChangedTheRegisterInBetween() throws IOException { + var service = afterFirstBoost(); + registers.values.put(4144, 38); + + service.apply(command("cwu_comfort", 48, Duration.ofHours(2))); + + assertEquals(45, service.pendingRestores().getFirst().originalValue()); + assertEquals(48, service.pendingRestores().getFirst().appliedValue()); + } + private static final class MutableClock extends Clock { private Instant now = T0; private long nanos;