}
private void verifyExternalizerForType(Object keySampleType, Class expectedExcternalizerClass) throws IOException {
ExternalizerTable externalizerTable = TestingUtil.extractExtTable(cacheManager);
Writer objectWriter = externalizerTable.getObjectWriter(keySampleType);
AssertJUnit.assertEquals("Registered Externalizers should be wrapped by a ForeignExternalizerAdapter",
objectWriter.getClass().toString(),
"class org.infinispan.marshall.jboss.ExternalizerTable$ForeignExternalizerAdapter");
AssertJUnit.assertEquals("Type of delegate used by the adapter doesn't match expected: " + expectedExcternalizerClass.getClass(),
"class " + objectWriter.toString(),
expectedExcternalizerClass.toString());
}