@Test void createHookShouldThrowWhenClassNotFound() { assertThatThrownBy(() -> testee.createHook(PreDeletionHookConfiguration.forClass("invalid"))) .isInstanceOf(ClassNotFoundException.class); }
@Override public PreDeletionHook createHook(PreDeletionHookConfiguration configuration) throws ClassNotFoundException { ClassName hookClass = new ClassName(configuration.getClazz()); LOGGER.info("Loading user registered mailbox message deletionHook {}", hookClass); return genericLoader.instantiate(hookClass); }
PreDeletionHookLoaderImpl implements PreDeletionHookLoader { @Override public PreDeletionHook createHook(PreDeletionHookConfiguration configuration) throws ClassNotFoundException { ClassName hookClass = new ClassName(configuration.getClazz()); LOGGER.info("Loading user registered mailbox message deletionHook {}", hookClass); return genericLoader.instantiate(hookClass); } }
PreDeletionHookLoaderImpl implements PreDeletionHookLoader { @Override public PreDeletionHook createHook(PreDeletionHookConfiguration configuration) throws ClassNotFoundException { ClassName hookClass = new ClassName(configuration.getClazz()); LOGGER.info("Loading user registered mailbox message deletionHook {}", hookClass); return genericLoader.instantiate(hookClass); } @Inject  PreDeletionHookLoaderImpl(GuiceGenericLoader guiceGenericLoader); }
PreDeletionHookLoaderImpl implements PreDeletionHookLoader { @Override public PreDeletionHook createHook(PreDeletionHookConfiguration configuration) throws ClassNotFoundException { ClassName hookClass = new ClassName(configuration.getClazz()); LOGGER.info("Loading user registered mailbox message deletionHook {}", hookClass); return genericLoader.instantiate(hookClass); } @Inject  PreDeletionHookLoaderImpl(GuiceGenericLoader guiceGenericLoader); @Override PreDeletionHook createHook(PreDeletionHookConfiguration configuration); }
PreDeletionHookLoaderImpl implements PreDeletionHookLoader { @Override public PreDeletionHook createHook(PreDeletionHookConfiguration configuration) throws ClassNotFoundException { ClassName hookClass = new ClassName(configuration.getClazz()); LOGGER.info("Loading user registered mailbox message deletionHook {}", hookClass); return genericLoader.instantiate(hookClass); } @Inject  PreDeletionHookLoaderImpl(GuiceGenericLoader guiceGenericLoader); @Override PreDeletionHook createHook(PreDeletionHookConfiguration configuration);  }