class JpaUnitObjectFactory implements ObjectFactory {

    @Override
    public void stop() {
        for (final Class<?> clazz : definitions.keySet()) {
            try {
                executor.processAfterAll(invocationsMap.get(clazz));
            } catch (final Exception e) {
                LOG.error("Failed to run after all hook", e);
            }
        }
        definitions.clear();
    }

}