protected String getResourceName(String resourceName, /*@NonNull*/ Method method) {
        // If resource name is present in annotation, use this value.
        if (StringUtil.isNotBlank(resourceName)) {
            return resourceName;
        }
        // Parse name of target method.
        return MethodUtil.resolveMethodName(method);
    }
@Test
    public void testGetResourceName() throws Exception {
        Method method = FooService.class.getMethod("random");
        String resourceName = "someRandom";
        String expectedResolvedName = FooService.class.getName() + ":random()";
        assertThat(getResourceName(resourceName, method)).isEqualTo(resourceName);
        assertThat(getResourceName(null, method)).isEqualTo(expectedResolvedName);
        assertThat(getResourceName("", method)).isEqualTo(expectedResolvedName);
    }