public JDefinedClass generateSerializerVersionTest( @Nonnull String serializerClassName, @Nonnull DomainObjectDescriptor domainObjectDescriptor ) throws JClassAlreadyExistsException {
JClass domainType = codeGenerator.ref( domainObjectDescriptor.getQualifiedName() );
JClass serializerClass = codeGenerator.ref( serializerClassName );
//the class
JDefinedClass testClass = codeModel._class( createSerializerVersionTestName( serializerClass.fullName() ) )._extends( createVersionExtendsClass( domainType, serializerClass ) );
//getSerializer
createGetSerializerMethod( testClass, serializerClass, domainType );
createVersionVerifyMethod( testClass, serializerClass, domainObjectDescriptor );
createVersionsDataPoint( testClass, serializerClass, domainType, domainObjectDescriptor );