IdClassParserValidator implements ParserValidator { @Override public <T> void parse(ClassCacheMgr cacheMgr, Annotation anno, CFMappingDef<T> cfMapDef) { if (anno instanceof IdClass) { parseIdClassAnnotation(cacheMgr, (IdClass) anno, cfMapDef); } else { throw new HectorObjectMapperException("This class cannot parse annotation, " + anno.getClass().getSimpleName()); } }  @Override void parse(ClassCacheMgr cacheMgr, Annotation anno, CFMappingDef<T> cfMapDef); @Override void validateAndSetDefaults(ClassCacheMgr cacheMgr, CFMappingDef<T> cfMapDef);  }
@Test public void testNotSerializable() { ClassCacheMgr cacheMgr = new ClassCacheMgr(); IdClassParserValidator parVal = new IdClassParserValidator(); CFMappingDef<MyTestBean> cfMapDef = new CFMappingDef<MyTestBean>(MyTestBean.class); IdClass anno = new IdClass() { @Override public Class<? extends Annotation> annotationType() { return IdClass.class; } @SuppressWarnings("rawtypes") @Override public Class value() { return MyCompositePK.class; } }; parVal.parse(cacheMgr, anno, cfMapDef); }