class InMemoryDataSetMetadataRepository extends ObjectDataSetMetadataRepository {

    void resetTransientValues(Object zeObject) {
        if (zeObject != null) {
            Field[] fields = zeObject.getClass().getDeclaredFields();
            for (Field field : fields) {
                // ignore jacoco injected field
                if (Modifier.isTransient(field.getModifiers()) && !field.getName().endsWith("jacocoData")) { //$NON-NLS-1$
                    Object defaultValue = Defaults.defaultValue(field.getType());
                    field.setAccessible(true);
                    try {
                        field.set(zeObject, defaultValue);
                    } catch (IllegalArgumentException | IllegalAccessException e) {
                        LOG.error("failed to reset the transient field [" + field + "] before storage", e);
                    }
                }
            }
        } // else null so do nothing
    }

}