final MemorySinkSource mem = new MemorySinkSource();
@Before
public void replaceEscapedCustomDfsSink() {
// Replace the null with a memory buffer that we have a reference to
SinkFactoryImpl sf = new SinkFactoryImpl();
sf.setSink("null", new SinkBuilder() {
@Override
public EventSink build(Context context, String... argv) {
LOG.info("excapedCustomDfs replaced with MemorySinkSource");
mem.reset();
return mem;