_staticConfigBuilder.setSourceName("5002", "test5.source2");
_schemaRegistry = new VersionedSchemaSetBackedRegistryService();
String schema31Str = "{\"name\":\"source1_v1\",\"namespace\":\"test3\",\"type\":\"record\",\"fields\":[{\"type\":\"int\",\"name\":\"intField\"}]}";
VersionedSchema vschema31 = new VersionedSchema("test3.source1", (short)1, Schema.parse(schema31Str), null);
String schema32Str = "{\"name\":\"source2_v1\",\"namespace\":\"test3\",\"type\":\"record\",\"fields\":[{\"type\":\"string\",\"name\":\"strField\"}]}";
VersionedSchema vschema32 = new VersionedSchema("test3.source2", (short)1, Schema.parse(schema32Str), null);
_schemaRegistry.registerSchema(vschema31);
_schemaRegistry.registerSchema(vschema32);
String schema41Str = "{\"name\":\"source1_v1\",\"namespace\":\"test4\",\"type\":\"record\",\"fields\":[{\"type\":\"int\",\"name\":\"intField\"}]}";
VersionedSchema vschema41 = new VersionedSchema("test4.source1", (short)1, Schema.parse(schema41Str), null);
String schema42Str = "{\"name\":\"source2_v1\",\"namespace\":\"test4\",\"type\":\"record\",\"fields\":[{\"type\":\"string\",\"name\":\"strField\"}]}";
VersionedSchema vschema42 = new VersionedSchema("test4.source2", (short)1, Schema.parse(schema42Str), null);
_schemaRegistry.registerSchema(vschema41);
_schemaRegistry.registerSchema(vschema42);
String schema51Str = "{\"name\":\"source1_v1\",\"namespace\":\"test5\",\"type\":\"record\",\"fields\":[{\"type\":\"int\",\"name\":\"intField\"}]}";
VersionedSchema vschema51 = new VersionedSchema("test5.source1", (short)1, Schema.parse(schema51Str), null);
//String schema52Str = "{\"name\":\"source2_v1\",\"namespace\":\"test5\",\"type\":\"record\",\"fields\":[{\"type\":\"string\",\"name\":\"strField\"}]}";
VersionedSchema vschema52 = new VersionedSchema("test5.source2", (short)1, Schema.parse(schema51Str), null);
_schemaRegistry.registerSchema(vschema51);
_schemaRegistry.registerSchema(vschema52);
// See https://iwww.corp.linkedin.com/wiki/cf/display/ENGS/Espresso+Metadata+Schema for
// the real definition.
String metadataSchemaStr = "{\"name\":\"metadata\",\"namespace\":\"test_namespace\",\"type\":\"record\",\"fields\":[{\"name\":\"randomStrField\",\"type\":\"string\"}]}";
// TODO (DDSDBUS-2093/2096): update this according to real schema-registry metadata API.
// (Right now the "metadata" string here is used as a key for lookups within the relay's
// schema registry, but that could conflict with an actual source schema named "metadata".)
VersionedSchema metaSchema = new VersionedSchema("metadata", (short)1, Schema.parse(metadataSchemaStr), null);
_schemaRegistry.registerSchema(metaSchema);
_staticConfigBuilder.getSchemaRegistry().setType(RegistryType.EXISTING.toString());
_staticConfigBuilder.getSchemaRegistry().useExistingService(_schemaRegistry);
_staticConfig = _staticConfigBuilder.build();