### Question:
DirectivePlugin extends Plugin { @Override @SuppressWarnings("unchecked") public void onEachClass(RootScope root, Class<?> aClass) { if (DirectiveProcessor.class.isAssignableFrom(aClass)) { root.getSettings(DirectiveSettings.class) .addProcessor((Class<? extends DirectiveProcessor<? extends Scope>>) aClass); } }  @Override @SuppressWarnings("unchecked") void onEachClass(RootScope root, Class<?> aClass);  }### Answer:
@Test void onEachClassPrivateDirectiveProcessor() { assertThatExceptionOfType(Bug.class) .isThrownBy(() -> new DirectivePlugin().onEachClass(root, PrivateDirectiveProcessor.class)); }
@Test void onEachClassNoNullaryDirectiveProcessor() { assertThatExceptionOfType(Bug.class) .isThrownBy(() -> new DirectivePlugin().onEachClass(root, NoNullaryDirectiveProcessor.class)); }
@Test void onEachClass() { new DirectivePlugin().onEachClass(root, TestDirectiveProcessor.class); assertThat(root.getSettings(DirectiveSettings.class).getProcessor("test")) .isInstanceOf(TestDirectiveProcessor.class); }