protected void validateConfig(Cache<VehicleId, Vehicle> vehicleCache) {
CacheLoaderConfiguration config = vehicleCache.getCacheConfiguration().loaders().cacheLoaders().get(0);
if (config instanceof JpaCacheStoreConfiguration) {
JpaCacheStoreConfiguration jpaConfig = (JpaCacheStoreConfiguration) config;
assert jpaConfig.batchSize() == 1;
assert jpaConfig.entityClass().equals(Vehicle.class) : jpaConfig.entityClass() + " != " + Vehicle.class;
assert jpaConfig.persistenceUnitName().equals("org.infinispan.loaders.jpa.configurationTest") : jpaConfig.persistenceUnitName() + " != " + "org.infinispan.loaders.jpa.configurationTest";
} else {
assert false : "Unknown configuation class " + config.getClass();
}
}