InfinispanPropertyCache implements PropertyService, ServiceLifecycle { @Override public void remove(String tenantId, String id) { propertyCache.remove(id); } InfinispanPropertyCache();  InfinispanPropertyCache(CacheContainer cacheContainer); @Override @PostConstruct void init(); @Override Property get(String tenantId, String id); @Override void store(String tenantId, List<Property<?>> properties); @Override void store(String tenantId, Property<?> property); @Override void remove(String tenantId, String id); @Override void addObserver(String tenantId, String id, Observer observer); @Override void removeObserver(String tenantId, String id, Observer observer);  }
@Test public void testRemove() throws CacheException { propertyCache.remove(null, "id1"); Assert.assertNull(propertyCache.get(null, "id1")); propertyCache.store(null, new Property<>("id", "foo")); CountingObserver observer = new CountingObserver(); propertyCache.addObserver(null, "id", observer); propertyCache.store(null, new Property<>("id", "bar")); Assert.assertEquals(1, observer.updatedCounter.intValue()); propertyCache.remove(null, "id"); Assert.assertNull(propertyCache.get(null, "id")); }