VersionStatusUpdater extends ControllerMaintainer { static SystemMonitor.Confidence convert(VespaVersion.Confidence confidence) { switch (confidence) { case broken: return broken; case low: return low; case normal: return normal; case high: return high; default: throw new IllegalArgumentException("Unexpected confidence '" + confidence + "'"); } } VersionStatusUpdater(Controller controller, Duration interval);   }
@Test public void testConfidenceConversion() { List.of(VespaVersion.Confidence.values()).forEach(VersionStatusUpdater::convert); assertEquals(SystemMonitor.Confidence.broken, VersionStatusUpdater.convert(VespaVersion.Confidence.broken)); assertEquals(SystemMonitor.Confidence.low, VersionStatusUpdater.convert(VespaVersion.Confidence.low)); assertEquals(SystemMonitor.Confidence.normal, VersionStatusUpdater.convert(VespaVersion.Confidence.normal)); assertEquals(SystemMonitor.Confidence.high, VersionStatusUpdater.convert(VespaVersion.Confidence.high)); }