### Question:
ConfigurationStore implements FalconService { public synchronized boolean remove(EntityType type, String name) throws FalconException { Map<String, Entity> entityMap = dictionary.get(type); if (entityMap.containsKey(name)) { try { archive(type, name); Entity entity = entityMap.get(name); onRemove(entity); entityMap.remove(name); } catch (IOException e) { throw new StoreAccessException(e); } AUDIT.info(type + " " + name + " is removed from config store"); return true; } return false; } private  ConfigurationStore(); static ConfigurationStore get(); FileSystem getFs(); Path getStorePath(); @Override void init(); void registerListener(ConfigurationChangeListener listener); void unregisterListener(ConfigurationChangeListener listener); synchronized void publish(EntityType type, Entity entity); synchronized void update(EntityType type, Entity entity); synchronized void initiateUpdate(Entity entity); @SuppressWarnings("unchecked") T get(EntityType type, String name); Collection<String> getEntities(EntityType type); synchronized boolean remove(EntityType type, String name); void cleanupUpdateInit(); @Override String getName(); @Override void destroy(); static final EntityType[] ENTITY_DELETE_ORDER; }### Answer:
@Test public void testRemove() throws Exception { Process process = new Process(); process.setName("remove"); store.publish(EntityType.PROCESS, process); Process p = store.get(EntityType.PROCESS, "remove"); Assert.assertEquals(p, process); store.remove(EntityType.PROCESS, "remove"); p = store.get(EntityType.PROCESS, "remove"); Assert.assertNull(p); store.publish(EntityType.PROCESS, process); store.registerListener(listener); try { store.remove(EntityType.PROCESS, "remove"); throw new AssertionError("Expected exception"); } catch(FalconException expected) { } store.unregisterListener(listener); }