@Test public void testDeserialize() throws Exception { String inputAsString = "some-input"; byte[] inputAsBytes = inputAsString.getBytes(); when(deserializationSchema.deserialize(any())).thenReturn(inputAsString); assertThat(deserializationSchemaWrapper.deserialize(pubSubMessage(inputAsString)), is(inputAsString)); verify(deserializationSchema, times(1)).deserialize(inputAsBytes); }
@Override public T deserialize(PubsubMessage pubsubMessage) throws Exception { return deserializationSchema.deserialize(pubsubMessage.getData().toByteArray()); }
DeserializationSchemaWrapper implements PubSubDeserializationSchema<T> { @Override public T deserialize(PubsubMessage pubsubMessage) throws Exception { return deserializationSchema.deserialize(pubsubMessage.getData().toByteArray()); } }
DeserializationSchemaWrapper implements PubSubDeserializationSchema<T> { @Override public T deserialize(PubsubMessage pubsubMessage) throws Exception { return deserializationSchema.deserialize(pubsubMessage.getData().toByteArray()); } DeserializationSchemaWrapper(DeserializationSchema<T> deserializationSchema); }
DeserializationSchemaWrapper implements PubSubDeserializationSchema<T> { @Override public T deserialize(PubsubMessage pubsubMessage) throws Exception { return deserializationSchema.deserialize(pubsubMessage.getData().toByteArray()); } DeserializationSchemaWrapper(DeserializationSchema<T> deserializationSchema); @Override boolean isEndOfStream(T t); @Override T deserialize(PubsubMessage pubsubMessage); @Override TypeInformation<T> getProducedType(); }
DeserializationSchemaWrapper implements PubSubDeserializationSchema<T> { @Override public T deserialize(PubsubMessage pubsubMessage) throws Exception { return deserializationSchema.deserialize(pubsubMessage.getData().toByteArray()); } DeserializationSchemaWrapper(DeserializationSchema<T> deserializationSchema); @Override boolean isEndOfStream(T t); @Override T deserialize(PubsubMessage pubsubMessage); @Override TypeInformation<T> getProducedType();  }