@Override
    public org.apache.kafka.streams.kstream.Transformer<KIn, VIn, Iterable<KeyValue<KOut, VOut>>> get() {
        return new org.apache.kafka.streams.kstream.Transformer<KIn, VIn, Iterable<KeyValue<KOut, VOut>>>() {

            private final org.apache.kafka.streams.kstream.Transformer<KIn, VIn, KeyValue<KOut, VOut>> transformer = transformerSupplier.get();

            @Override
            public void init(final ProcessorContext context) {
                transformer.init(context);
            }

            @Override
            public Iterable<KeyValue<KOut, VOut>> transform(final KIn key, final VIn value) {
                final KeyValue<KOut, VOut> pair = transformer.transform(key, value);
                if (pair != null) {
                    return Collections.singletonList(pair);
                }
                return Collections.emptyList();
            }

            @Override
            public void close() {
                transformer.close();
            }
        };
    }
@Test
    public void shouldCallCloseOfAdaptedTransformer() {
        when(transformerSupplier.get()).thenReturn(transformer);

        final TransformerSupplierAdapter<String, String, Integer, Integer> adapter =
            new TransformerSupplierAdapter<>(transformerSupplier);
        final org.apache.kafka.streams.kstream.Transformer<String, String, Iterable<KeyValue<Integer, Integer>>> adaptedTransformer = adapter.get();
        adaptedTransformer.close();

        verify(transformer).close();
    }