MetricUtils { public static Optional<Method> getMethodFor(final Class<? extends ExecutionProperty> clazz, final String name, final Class<?>... valueTypes) { try { final Method mthd = clazz.getMethod(name, valueTypes); return Optional.of(mthd); } catch (final Exception e) { return Optional.empty(); } } private  MetricUtils(); static Boolean loadMetaData(); static Boolean metaDataLoaded(); static Pair<String, String> stringifyIRDAGProperties(final IRDAG irdag); static Optional<Method> getMethodFor(final Class<? extends ExecutionProperty> clazz,
                                              final String name, final Class<?>... valueTypes); static ExecutionProperty<? extends Serializable> keyAndValueToEP(
    final Integer epKeyIndex,
    final Double split,
    final Double tweak); static final String SQLITE_DB_NAME; static final String POSTGRESQL_METADATA_DB_NAME; }
@Test public void validateStaticConstructorsOfExecutionProperties() { MetricUtils.EP_KEY_METADATA.values().forEach(p -> Assert.assertTrue( p.left().getName() + "should have an 'of' method with its value class, " + p.right().getName(), MetricUtils.getMethodFor(p.left(), "of", p.right()).isPresent())); }