yeg
2026-09-09 b837cc1f88e6fa14442f66eecb59c45464dd7bb3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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());
    }
}