protected void compareStoreConfiguration(String name, StoreConfiguration beforeStore, StoreConfiguration afterStore) { if (beforeStore instanceof AbstractStoreConfiguration) { AbstractStoreConfiguration beforeASC = (AbstractStoreConfiguration) beforeStore; AbstractStoreConfiguration afterASC = (AbstractStoreConfiguration) afterStore; compareAttributeSets(name, beforeASC.attributes(), afterASC.attributes()); compareAttributeSets(name, beforeASC.singletonStore().attributes(), afterASC.singletonStore().attributes()); compareAttributeSets(name, beforeASC.async().attributes(), afterASC.async().attributes()); } else { throw new IllegalArgumentException("Cannot compare stores of type: " + beforeStore.getClass().getName()); } }