ClassSelector { public static ClassSelector create(String[] list) { ClassSelector classSelector = new ClassSelector(); if (list == null) { return classSelector; } for (String value : list) { classSelector.add(value); } return classSelector; } ClassSelector(); void add(String fullDescription); void add(String clazz, String fullDescription); MethodSelector selectByClass(String name); MethodSelector selectByInterface(String[] interfaces); MethodSelector selectBySuper(String name); MethodSelector selectBySuper(String[] superClasses); MethodSelector selectByPattern(String name); boolean isEmpty(); boolean containsKey(Object key); static ClassSelector create(String[] list); static ClassSelector create(List<String> list);  }
@Test public void testCreate() { ClassSelector selector = ClassSelector.create(target); assertThat(selector.selectByClass(DataSource.class.getName()), notNullValue()); assertThat(selector.selectByClass(TestMethods.class.getName()), notNullValue()); assertThat(selector.selectByClass("simula.P"), notNullValue()); MethodSelector methodSelector = selector.selectByClass("java.lang.String"); assertThat(methodSelector.size(), is(0)); assertNotNull(methodSelector); }