@Test public void testRegisterSchemaCacheWithVersionAndId() throws Exception { expect(restService.registerSchema(anyString(), anyString(), anyObject(List.class), eq(SUBJECT_0), eq(VERSION_1), eq(ID_25))) .andReturn(ID_25) .once(); replay(restService); assertEquals(ID_25, client.register(SUBJECT_0, AVRO_SCHEMA_0, VERSION_1, ID_25)); assertEquals(ID_25, client.register(SUBJECT_0, AVRO_SCHEMA_0, VERSION_1, ID_25)); verify(restService); }
@Override public synchronized int register(String subject, ParsedSchema schema) throws IOException, RestClientException { return register(subject, schema, 0, -1); }
CachedSchemaRegistryClient implements SchemaRegistryClient { @Override public synchronized int register(String subject, ParsedSchema schema) throws IOException, RestClientException { return register(subject, schema, 0, -1); } }
CachedSchemaRegistryClient implements SchemaRegistryClient { @Override public synchronized int register(String subject, ParsedSchema schema) throws IOException, RestClientException { return register(subject, schema, 0, -1); } CachedSchemaRegistryClient(String baseUrl, int identityMapCapacity);  CachedSchemaRegistryClient(List<String> baseUrls, int identityMapCapacity);  CachedSchemaRegistryClient(RestService restService, int identityMapCapacity);  CachedSchemaRegistryClient(
      String baseUrl,
      int identityMapCapacity,
      Map<String, ?> originals);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      Map<String, ?> originals);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      List<SchemaProvider> providers,
      Map<String, ?> originals);  CachedSchemaRegistryClient(
      RestService restService,
      int identityMapCapacity,
      Map<String, ?> configs);  CachedSchemaRegistryClient(
      String baseUrl,
      int identityMapCapacity,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      List<SchemaProvider> providers,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      RestService restService,
      int identityMapCapacity,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      RestService restService,
      int identityMapCapacity,
      List<SchemaProvider> providers,
      Map<String, ?> configs,
      Map<String, String> httpHeaders); }
CachedSchemaRegistryClient implements SchemaRegistryClient { @Override public synchronized int register(String subject, ParsedSchema schema) throws IOException, RestClientException { return register(subject, schema, 0, -1); } CachedSchemaRegistryClient(String baseUrl, int identityMapCapacity);  CachedSchemaRegistryClient(List<String> baseUrls, int identityMapCapacity);  CachedSchemaRegistryClient(RestService restService, int identityMapCapacity);  CachedSchemaRegistryClient(
      String baseUrl,
      int identityMapCapacity,
      Map<String, ?> originals);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      Map<String, ?> originals);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      List<SchemaProvider> providers,
      Map<String, ?> originals);  CachedSchemaRegistryClient(
      RestService restService,
      int identityMapCapacity,
      Map<String, ?> configs);  CachedSchemaRegistryClient(
      String baseUrl,
      int identityMapCapacity,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      List<SchemaProvider> providers,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      RestService restService,
      int identityMapCapacity,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      RestService restService,
      int identityMapCapacity,
      List<SchemaProvider> providers,
      Map<String, ?> configs,
      Map<String, String> httpHeaders); @Override Optional<ParsedSchema> parseSchema(
      String schemaType,
      String schemaString,
      List<SchemaReference> references); Map<String, SchemaProvider> getSchemaProviders(); @Override synchronized int register(String subject, ParsedSchema schema); @Override synchronized int register(String subject, ParsedSchema schema, int version, int id); @Override synchronized ParsedSchema getSchemaById(int id); @Override synchronized ParsedSchema getSchemaBySubjectAndId(String subject, int id); @Override Collection<String> getAllSubjectsById(int id); @Override Collection<SubjectVersion> getAllVersionsById(int id); @Override Schema getByVersion(String subject, int version, boolean lookupDeletedSchema); @Override SchemaMetadata getSchemaMetadata(String subject, int version); @Override synchronized SchemaMetadata getLatestSchemaMetadata(String subject); @Override synchronized int getVersion(String subject, ParsedSchema schema); @Override List<Integer> getAllVersions(String subject); @Override synchronized int getId(String subject, ParsedSchema schema); @Override List<Integer> deleteSubject(String subject,
           boolean isPermanent); @Override synchronized List<Integer> deleteSubject(
      Map<String, String> requestProperties, String subject, boolean isPermanent); @Override Integer deleteSchemaVersion(String subject, String version, boolean isPermanent); @Override synchronized Integer deleteSchemaVersion(
      Map<String, String> requestProperties,
      String subject,
      String version,
      boolean isPermanent); @Override boolean testCompatibility(String subject, ParsedSchema schema); @Override List<String> testCompatibilityVerbose(String subject, ParsedSchema schema); @Override String updateCompatibility(String subject, String compatibility); @Override String getCompatibility(String subject); @Override String setMode(String mode); @Override String setMode(String mode, String subject); @Override String getMode(); @Override String getMode(String subject); @Override Collection<String> getAllSubjects(); @Override void reset(); }
CachedSchemaRegistryClient implements SchemaRegistryClient { @Override public synchronized int register(String subject, ParsedSchema schema) throws IOException, RestClientException { return register(subject, schema, 0, -1); } CachedSchemaRegistryClient(String baseUrl, int identityMapCapacity);  CachedSchemaRegistryClient(List<String> baseUrls, int identityMapCapacity);  CachedSchemaRegistryClient(RestService restService, int identityMapCapacity);  CachedSchemaRegistryClient(
      String baseUrl,
      int identityMapCapacity,
      Map<String, ?> originals);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      Map<String, ?> originals);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      List<SchemaProvider> providers,
      Map<String, ?> originals);  CachedSchemaRegistryClient(
      RestService restService,
      int identityMapCapacity,
      Map<String, ?> configs);  CachedSchemaRegistryClient(
      String baseUrl,
      int identityMapCapacity,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      List<String> baseUrls,
      int identityMapCapacity,
      List<SchemaProvider> providers,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      RestService restService,
      int identityMapCapacity,
      Map<String, ?> originals,
      Map<String, String> httpHeaders);  CachedSchemaRegistryClient(
      RestService restService,
      int identityMapCapacity,
      List<SchemaProvider> providers,
      Map<String, ?> configs,
      Map<String, String> httpHeaders); @Override Optional<ParsedSchema> parseSchema(
      String schemaType,
      String schemaString,
      List<SchemaReference> references); Map<String, SchemaProvider> getSchemaProviders(); @Override synchronized int register(String subject, ParsedSchema schema); @Override synchronized int register(String subject, ParsedSchema schema, int version, int id); @Override synchronized ParsedSchema getSchemaById(int id); @Override synchronized ParsedSchema getSchemaBySubjectAndId(String subject, int id); @Override Collection<String> getAllSubjectsById(int id); @Override Collection<SubjectVersion> getAllVersionsById(int id); @Override Schema getByVersion(String subject, int version, boolean lookupDeletedSchema); @Override SchemaMetadata getSchemaMetadata(String subject, int version); @Override synchronized SchemaMetadata getLatestSchemaMetadata(String subject); @Override synchronized int getVersion(String subject, ParsedSchema schema); @Override List<Integer> getAllVersions(String subject); @Override synchronized int getId(String subject, ParsedSchema schema); @Override List<Integer> deleteSubject(String subject,
           boolean isPermanent); @Override synchronized List<Integer> deleteSubject(
      Map<String, String> requestProperties, String subject, boolean isPermanent); @Override Integer deleteSchemaVersion(String subject, String version, boolean isPermanent); @Override synchronized Integer deleteSchemaVersion(
      Map<String, String> requestProperties,
      String subject,
      String version,
      boolean isPermanent); @Override boolean testCompatibility(String subject, ParsedSchema schema); @Override List<String> testCompatibilityVerbose(String subject, ParsedSchema schema); @Override String updateCompatibility(String subject, String compatibility); @Override String getCompatibility(String subject); @Override String setMode(String mode); @Override String setMode(String mode, String subject); @Override String getMode(); @Override String getMode(String subject); @Override Collection<String> getAllSubjects(); @Override void reset(); static final Map<String, String> DEFAULT_REQUEST_PROPERTIES; }