config.setName(param.getName());
config.setImplementation("java.lang.String");
param.setObject(config);
params.addParameter(param);
CacheService cs = new CacheServiceImpl(params, new MyExoCacheFactory());
assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("NoImpl").getClass(),
cs.getCacheInstance("NoImpl") instanceof MyExoCache);
assertTrue("Expected type ConcurrentFIFOExoCache found " + cs.getCacheInstance("KnownImpl").getClass(),
cs.getCacheInstance("KnownImpl") instanceof ConcurrentFIFOExoCache);
assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("UnKnownImpl").getClass(),
cs.getCacheInstance("UnKnownImpl") instanceof MyExoCache);
assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("UnKnownImplButCorrectFQN").getClass(),
cs.getCacheInstance("UnKnownImplButCorrectFQN") instanceof MyExoCache);
assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("NoImpl-MyExoCacheConfig").getClass(),
cs.getCacheInstance("NoImpl-MyExoCacheConfig") instanceof MyExoCache);
assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("KnownImpl-MyExoCacheConfig").getClass(),
cs.getCacheInstance("KnownImpl-MyExoCacheConfig") instanceof MyExoCache);
assertTrue("Expected type MyExoCache found " + cs.getCacheInstance("UnKnownImpl-MyExoCacheConfig").getClass(),
cs.getCacheInstance("UnKnownImpl-MyExoCacheConfig") instanceof MyExoCache);
assertTrue("Expected type MyExoCache found "
+ cs.getCacheInstance("UnKnownImplButCorrectFQN-MyExoCacheConfig").getClass(),
cs.getCacheInstance("UnKnownImplButCorrectFQN-MyExoCacheConfig") instanceof MyExoCache);
}