@Test void fromShouldThrowWhenClassNameIsEmpty() { HierarchicalConfiguration<ImmutableNode> configuration = new BaseHierarchicalConfiguration(); configuration.addProperty("class", ""); assertThatThrownBy(() -> PreDeletionHookConfiguration.from(configuration)) .isInstanceOf(ConfigurationException.class); }
public static PreDeletionHookConfiguration from(HierarchicalConfiguration<ImmutableNode> configuration) throws ConfigurationException { Preconditions.checkNotNull(configuration); try { return forClass(configuration.getString(CLASS_NAME_CONFIGURATION_ENTRY)); } catch (Exception e) { throw new ConfigurationException("Exception encountered in PreDeletionHook configuration", e); } }
PreDeletionHookConfiguration { public static PreDeletionHookConfiguration from(HierarchicalConfiguration<ImmutableNode> configuration) throws ConfigurationException { Preconditions.checkNotNull(configuration); try { return forClass(configuration.getString(CLASS_NAME_CONFIGURATION_ENTRY)); } catch (Exception e) { throw new ConfigurationException("Exception encountered in PreDeletionHook configuration", e); } } }
PreDeletionHookConfiguration { public static PreDeletionHookConfiguration from(HierarchicalConfiguration<ImmutableNode> configuration) throws ConfigurationException { Preconditions.checkNotNull(configuration); try { return forClass(configuration.getString(CLASS_NAME_CONFIGURATION_ENTRY)); } catch (Exception e) { throw new ConfigurationException("Exception encountered in PreDeletionHook configuration", e); } } private  PreDeletionHookConfiguration(String clazz); }
PreDeletionHookConfiguration { public static PreDeletionHookConfiguration from(HierarchicalConfiguration<ImmutableNode> configuration) throws ConfigurationException { Preconditions.checkNotNull(configuration); try { return forClass(configuration.getString(CLASS_NAME_CONFIGURATION_ENTRY)); } catch (Exception e) { throw new ConfigurationException("Exception encountered in PreDeletionHook configuration", e); } } private  PreDeletionHookConfiguration(String clazz); static PreDeletionHookConfiguration from(HierarchicalConfiguration<ImmutableNode> configuration); static PreDeletionHookConfiguration forClass(Class<? extends PreDeletionHook> clazz); static PreDeletionHookConfiguration forClass(String clazz); String getClazz(); @Override final boolean equals(Object o); @Override final int hashCode(); }
PreDeletionHookConfiguration { public static PreDeletionHookConfiguration from(HierarchicalConfiguration<ImmutableNode> configuration) throws ConfigurationException { Preconditions.checkNotNull(configuration); try { return forClass(configuration.getString(CLASS_NAME_CONFIGURATION_ENTRY)); } catch (Exception e) { throw new ConfigurationException("Exception encountered in PreDeletionHook configuration", e); } } private  PreDeletionHookConfiguration(String clazz); static PreDeletionHookConfiguration from(HierarchicalConfiguration<ImmutableNode> configuration); static PreDeletionHookConfiguration forClass(Class<? extends PreDeletionHook> clazz); static PreDeletionHookConfiguration forClass(String clazz); String getClazz(); @Override final boolean equals(Object o); @Override final int hashCode(); static final String CLASS_NAME_CONFIGURATION_ENTRY; }