AnnotationProcessor { public boolean hasDependencies(Class<?> pluginClass) { getPluginAnnotation(pluginClass); final Constructor<?>[] constructors = pluginClass.getConstructors(); if (constructors.length == 0) return false; for (Constructor<?> constructor : constructors) { final Inject annotation = constructor.getAnnotation(Inject.class); if (annotation != null) { return true; } } return false; }  static String getPluginName(T plugin); static String getPluginName(Class<T> plugin); boolean hasDependencies(Class<?> pluginClass); Collection<Node<?>> getDependencies(Class<?> pluginClass);  }
@Test public void shouldDetectDependencies() { final boolean hasDependencies = sut.hasDependencies(DependencyPlugin.class); assertTrue(hasDependencies); }
@Test public void shouldReturnFalseOnNoDependencies() { final boolean hasDependencies = sut.hasDependencies(TestPlugin.class); assertFalse(hasDependencies); }