package com.battery.business.web; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import java.lang.reflect.Method; import org.junit.jupiter.api.Test; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; class TDetectionCabinetControllerContractTest { @Test void keepsOriginalDiscoveredDeviceSelectionEndpoint() throws Exception { Method method = TDetectionCabinetController.class.getMethod("discoveredList"); assertArrayEquals(new String[] { "/discovered/list" }, method.getAnnotation(GetMapping.class).value()); assertEquals("@ss.hasPermi('system:detectionCabinet:list')", method.getAnnotation(PreAuthorize.class).value()); } }