class SecondLevelCacheDecorator implements TestMethodDecorator {

    @Override
    public void afterTest(final TestInvocation invocation) throws Exception {
        final EntityManagerFactory emf = (EntityManagerFactory) invocation.getContext().getData(Constants.KEY_ENTITY_MANAGER_FACTORY);

        evictCache(invocation.getFeatureResolver().shouldEvictCacheAfter(), emf);
    }

}