public static AopAuthorizeDefinition from(Class<?> targetClass, Method method) {
        AopAuthorizeDefinitionParser parser = new AopAuthorizeDefinitionParser(targetClass, method);

        return parser.parse();
    }
@Test
    @SneakyThrows
    public void testCustomAnn() {
        AopAuthorizeDefinition definition =
                DefaultBasicAuthorizeDefinition.from(TestController.class, TestController.class.getMethod("test"));

        ResourceDefinition resource = definition.getResources()
                .getResource("test").orElseThrow(NullPointerException::new);

        Assert.assertNotNull(resource);

        Assert.assertTrue(resource.hasAction(Arrays.asList("add")));

        Assert.assertTrue(resource.getAction("add")
                .map(act->act.getDataAccess().getType("user_own_data"))
                .isPresent());
    }