### Question:
AbstractSentinelAspectSupport { protected String getResourceName(String resourceName, Method method) { if (StringUtil.isNotBlank(resourceName)) { return resourceName; } return MethodUtil.resolveMethodName(method); }    }### Answer:
@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); }