class TransformerSupplierAdapter implements TransformerSupplier<KIn, VIn, Iterable<KeyValue<KOut, VOut>>> {

    @Override
    public Transformer<KIn, VIn, Iterable<KeyValue<KOut, VOut>>> get() {
        return new Transformer<KIn, VIn, Iterable<KeyValue<KOut, VOut>>>() {

            private 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();
            }
        };
    }

    public  TransformerSupplierAdapter(final TransformerSupplier<KIn, VIn, KeyValue<KOut, VOut>> transformerSupplier);

}