private Map<String, Object> convertValueToConformStream(List<TopologyStream> outputStreams, String streamId, Map<String, Object> value) { Optional<TopologyStream> outputStream = outputStreams.stream().filter(o -> o.getStreamId().equals(streamId)).findFirst(); if (!outputStream.isPresent()) { throw new IllegalArgumentException("Stream " + streamId + " doesn't exist."); } return SchemaValueConverter.convertMap(Schema.of(outputStream.get().getFields()), value); }
private Map<String, Object> convertValueToConformStream(String streamId, Map<String, Object> value) { Stream stream = testRunSource.getOutputStream(streamId); if (stream == null) { throw new IllegalArgumentException("Stream " + streamId + " doesn't exist."); } return SchemaValueConverter.convertMap(stream.getSchema(), value); }