@Test void testCleanCacheBeforeAdd() { EntityType entityType = mock(EntityType.class); when(entityType.getInversedByAttributes()).thenReturn(Stream.empty()); Entity entity = mock(Entity.class); when(entity.getEntityType()).thenReturn(entityType); l1CacheJanitorImpl.cleanCacheBeforeAdd(entity); verifyNoInteractions(l1Cache); }
@Override public void cleanCacheBeforeAdd(Entity entity) { cleanCacheBeforeAddOrDelete(entity); }
L1CacheJanitorImpl implements L1CacheJanitor { @Override public void cleanCacheBeforeAdd(Entity entity) { cleanCacheBeforeAddOrDelete(entity); } }
L1CacheJanitorImpl implements L1CacheJanitor { @Override public void cleanCacheBeforeAdd(Entity entity) { cleanCacheBeforeAddOrDelete(entity); } L1CacheJanitorImpl(L1Cache l1Cache); }
L1CacheJanitorImpl implements L1CacheJanitor { @Override public void cleanCacheBeforeAdd(Entity entity) { cleanCacheBeforeAddOrDelete(entity); } L1CacheJanitorImpl(L1Cache l1Cache); @Override void cleanCacheBeforeAdd(Entity entity); @Override Stream<Entity> cleanCacheBeforeAdd(EntityType entityType, Stream<Entity> entityStream); @Override void cleanCacheBeforeUpdate(Entity entity); @Override Stream<Entity> cleanCacheBeforeUpdate(EntityType entityType, Stream<Entity> entityStream); @Override void cleanCacheBeforeDelete(Entity entity); @Override Stream<Entity> cleanCacheBeforeDelete(EntityType entityType, Stream<Entity> entityStream); @Override void cleanCacheBeforeDeleteById(EntityType entityType, Object entityId); @Override Stream<Object> cleanCacheBeforeDeleteById(
      EntityType entityType, Stream<Object> entityIdStream); @Override void cleanCacheBeforeDeleteAll(EntityType entityType); }
L1CacheJanitorImpl implements L1CacheJanitor { @Override public void cleanCacheBeforeAdd(Entity entity) { cleanCacheBeforeAddOrDelete(entity); } L1CacheJanitorImpl(L1Cache l1Cache); @Override void cleanCacheBeforeAdd(Entity entity); @Override Stream<Entity> cleanCacheBeforeAdd(EntityType entityType, Stream<Entity> entityStream); @Override void cleanCacheBeforeUpdate(Entity entity); @Override Stream<Entity> cleanCacheBeforeUpdate(EntityType entityType, Stream<Entity> entityStream); @Override void cleanCacheBeforeDelete(Entity entity); @Override Stream<Entity> cleanCacheBeforeDelete(EntityType entityType, Stream<Entity> entityStream); @Override void cleanCacheBeforeDeleteById(EntityType entityType, Object entityId); @Override Stream<Object> cleanCacheBeforeDeleteById(
      EntityType entityType, Stream<Object> entityIdStream); @Override void cleanCacheBeforeDeleteAll(EntityType entityType);  }