@Test(expected = InvalidSchemaVersionException.class) public void registerSchema_specifyVersion_InvalidSchemaVersionException() throws Exception { road1.setSchemas(Collections.singletonMap(1, schemaVersion1)); client.registerSchema("road1", schema1, 1); }
@Override public SchemaVersion registerSchema(String name, Schema schema) throws InvalidSchemaException, ServiceException, UnknownRoadException { return registerSchema(name, schema, OptionalInt.empty()); }
TollboothSchemaStoreClient implements SchemaStoreClient { @Override public SchemaVersion registerSchema(String name, Schema schema) throws InvalidSchemaException, ServiceException, UnknownRoadException { return registerSchema(name, schema, OptionalInt.empty()); } }
TollboothSchemaStoreClient implements SchemaStoreClient { @Override public SchemaVersion registerSchema(String name, Schema schema) throws InvalidSchemaException, ServiceException, UnknownRoadException { return registerSchema(name, schema, OptionalInt.empty()); } @Autowired  TollboothSchemaStoreClient(@Value("#{store}") Map<String, Road> store, PatchSetEmitter modificationEmitter); }
TollboothSchemaStoreClient implements SchemaStoreClient { @Override public SchemaVersion registerSchema(String name, Schema schema) throws InvalidSchemaException, ServiceException, UnknownRoadException { return registerSchema(name, schema, OptionalInt.empty()); } @Autowired  TollboothSchemaStoreClient(@Value("#{store}") Map<String, Road> store, PatchSetEmitter modificationEmitter); @Override Optional<SchemaVersion> getSchema(String name, int version); @Override Optional<SchemaVersion> getActiveSchema(String name, int version); @Override Optional<SchemaVersion> getLatestActiveSchema(String name); @Override SchemaVersion registerSchema(String name, Schema schema); @Override SchemaVersion registerSchema(String name, Schema schema, int version); @Override Map<Integer, SchemaVersion> getAllSchemaVersions(String name); @Override Map<Integer, SchemaVersion> getActiveSchemaVersions(String name); @Override void deleteSchemaVersion(String name, int version); }
TollboothSchemaStoreClient implements SchemaStoreClient { @Override public SchemaVersion registerSchema(String name, Schema schema) throws InvalidSchemaException, ServiceException, UnknownRoadException { return registerSchema(name, schema, OptionalInt.empty()); } @Autowired  TollboothSchemaStoreClient(@Value("#{store}") Map<String, Road> store, PatchSetEmitter modificationEmitter); @Override Optional<SchemaVersion> getSchema(String name, int version); @Override Optional<SchemaVersion> getActiveSchema(String name, int version); @Override Optional<SchemaVersion> getLatestActiveSchema(String name); @Override SchemaVersion registerSchema(String name, Schema schema); @Override SchemaVersion registerSchema(String name, Schema schema, int version); @Override Map<Integer, SchemaVersion> getAllSchemaVersions(String name); @Override Map<Integer, SchemaVersion> getActiveSchemaVersions(String name); @Override void deleteSchemaVersion(String name, int version);  }