@Test(expected = RuntimeException.class) public void testNewInstance_instantiationException() { ReflectionUtil.newInstance(AnomalyThresholds.class); }
public static <T> T newInstance(Class<T> clazz) { try { return clazz.newInstance(); } catch (InstantiationException | IllegalAccessException e) { log.error("Error instantiating " + clazz.getName(), e); throw new RuntimeException(e); } }
ReflectionUtil { public static <T> T newInstance(Class<T> clazz) { try { return clazz.newInstance(); } catch (InstantiationException | IllegalAccessException e) { log.error("Error instantiating " + clazz.getName(), e); throw new RuntimeException(e); } } }
ReflectionUtil { public static <T> T newInstance(Class<T> clazz) { try { return clazz.newInstance(); } catch (InstantiationException | IllegalAccessException e) { log.error("Error instantiating " + clazz.getName(), e); throw new RuntimeException(e); } }  }
ReflectionUtil { public static <T> T newInstance(Class<T> clazz) { try { return clazz.newInstance(); } catch (InstantiationException | IllegalAccessException e) { log.error("Error instantiating " + clazz.getName(), e); throw new RuntimeException(e); } }  static T newInstance(Class<T> clazz); }
ReflectionUtil { public static <T> T newInstance(Class<T> clazz) { try { return clazz.newInstance(); } catch (InstantiationException | IllegalAccessException e) { log.error("Error instantiating " + clazz.getName(), e); throw new RuntimeException(e); } }  static T newInstance(Class<T> clazz);  }