@Test public void getSchemaWithId() { SchemaVersion schemaVersion = underTest.getSchemaVersion(); assertThat(schemaVersion.getSchema(), is(SCHEMA)); assertThat(schemaVersion.getVersion(), is(1)); }
@Override public SchemaVersion getSchemaVersion() { Road road = getRoad(); String roadName = road.getName(); return SchemaVersion.latest(road.getSchemas().values()).orElseThrow( () -> new RoadUnavailableException(String.format("Road '%s' has no schema.", roadName))); }
OnrampImpl extends OnrampTemplate<byte[], byte[]> implements Onramp { @Override public SchemaVersion getSchemaVersion() { Road road = getRoad(); String roadName = road.getName(); return SchemaVersion.latest(road.getSchemas().values()).orElseThrow( () -> new RoadUnavailableException(String.format("Road '%s' has no schema.", roadName))); } }
OnrampImpl extends OnrampTemplate<byte[], byte[]> implements Onramp { @Override public SchemaVersion getSchemaVersion() { Road road = getRoad(); String roadName = road.getName(); return SchemaVersion.latest(road.getSchemas().values()).orElseThrow( () -> new RoadUnavailableException(String.format("Road '%s' has no schema.", roadName))); } OnrampImpl(OnrampMetrics metrics, Producer<byte[], byte[]> kafkaProducer, Road road); }
OnrampImpl extends OnrampTemplate<byte[], byte[]> implements Onramp { @Override public SchemaVersion getSchemaVersion() { Road road = getRoad(); String roadName = road.getName(); return SchemaVersion.latest(road.getSchemas().values()).orElseThrow( () -> new RoadUnavailableException(String.format("Road '%s' has no schema.", roadName))); } OnrampImpl(OnrampMetrics metrics, Producer<byte[], byte[]> kafkaProducer, Road road); @Override SchemaVersion getSchemaVersion(); }
OnrampImpl extends OnrampTemplate<byte[], byte[]> implements Onramp { @Override public SchemaVersion getSchemaVersion() { Road road = getRoad(); String roadName = road.getName(); return SchemaVersion.latest(road.getSchemas().values()).orElseThrow( () -> new RoadUnavailableException(String.format("Road '%s' has no schema.", roadName))); } OnrampImpl(OnrampMetrics metrics, Producer<byte[], byte[]> kafkaProducer, Road road); @Override SchemaVersion getSchemaVersion();  }