### Question:
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();  }### Answer:
@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); }