@Test
public void testEvictionOfSecondLevelCacheIsRunInBeforeTestPhaseIfConfiguredForIt() throws Throwable {

    // GIVEN
    when(resolver.shouldEvictCacheBefore()).thenReturn(Boolean.TRUE);
    final SecondLevelCacheDecorator fixture = new SecondLevelCacheDecorator();
    // WHEN
    fixture.beforeTest(invocation);
    // THEN
    verify(cache).evictAll();
    verify(emf, times(0)).close();
}