yeg
2026-09-29 b78295e8da96c3e5e76befeef9582ce5273dbb74
ruoyi-admin/src/test/java/com/battery/business/service/impl/TTestLiveServiceImplTest.java
@@ -66,7 +66,7 @@
        for (Instant deviceTime : List.of(now.minusSeconds(1), now)) {
            var measurement = new TestDataObservationAdapter.CollectorMeasurement("S-01", 1L, deviceTime, deviceTime.toString(),
                    now, "TEMPERATURE", new BigDecimal("38"), "℃");
            when(adapter.latestCollector("collector-7")).thenReturn(new TestDataObservationAdapter.CollectorRealtime(
            when(adapter.latestCollector(org.mockito.ArgumentMatchers.nullable(String.class), org.mockito.ArgumentMatchers.eq("collector-7"))).thenReturn(new TestDataObservationAdapter.CollectorRealtime(
                    "collector-7", true, 1000, List.of(measurement), null));
            assertEquals(deviceTime.equals(now) ? 1 : 0, service.current(10L).exceptions().size());
        }
@@ -391,7 +391,7 @@
        when(simulator.testPlan(any(ChannelIdentity.class))).thenReturn(plan);
        if (mapper != null && test.getBatteries().get(0).getCollectorId() != null) {
            when(mapper.selectCollectorCode(7L)).thenReturn("collector-7");
            when(simulator.latestCollector("collector-7")).thenReturn(
            when(simulator.latestCollector(org.mockito.ArgumentMatchers.nullable(String.class), org.mockito.ArgumentMatchers.eq("collector-7"))).thenReturn(
                    new TestDataObservationAdapter.CollectorRealtime("collector-7", online, 1000, List.of(), null));
        }