MonitorMethodInterceptorDefinitionDecorator implements
                BeanDefinitionDecorator { public List<String> parseMethodList(String methods) { String[] methodArray = StringUtils.delimitedListToStringArray(methods, ","); List<String> methodList = new ArrayList<String>(); for (String methodName : methodArray) { methodList.add(methodName.trim()); } return methodList; }  BeanDefinitionHolder decorate(Node source,
                                         BeanDefinitionHolder holder,
                                         ParserContext context); List<String> parseMethodList(String methods);  }
@Test public void testParseMethodListNoName() { List<String> methods = decorator.parseMethodList(""); Assert.assertNotNull(methods); Assert.assertTrue(methods.size() == 0); }
@Test public void testParseMethodListOneName() { List<String> methods = decorator.parseMethodList("foo"); Assert.assertNotNull(methods); Assert.assertTrue(methods.size() == 1); Assert.assertTrue(methods.contains("foo")); }
@Test public void testParseMethodListTwoNames() { List<String> methods = decorator.parseMethodList("foo, bar"); Assert.assertNotNull(methods); Assert.assertTrue(methods.size() == 2); Assert.assertTrue(methods.contains("foo")); Assert.assertTrue(methods.contains("bar")); }
@Test public void testParseMethodListThreeNames() { List<String> methods = decorator.parseMethodList("foo, bar, baz"); Assert.assertNotNull(methods); Assert.assertTrue(methods.size() == 3); Assert.assertTrue(methods.contains("foo")); Assert.assertTrue(methods.contains("bar")); Assert.assertTrue(methods.contains("baz")); }