public void test() {
Context context = new Context();
context.put("type", FailoverSinkProcessor.class.getName());
context.put("priority.sink1", "1");
context.put("priority.sink2", "2");
SinkFactory sf = new DefaultSinkFactory();
List<Sink> sinks = new ArrayList<Sink>();
sinks.add(sf.create("sink1", "avro"));
sinks.add(sf.create("sink2", "avro"));
SinkProcessor sp = SinkProcessorFactory.getProcessor(context, sinks);
context.put("type", "failover");
SinkProcessor sp2 = SinkProcessorFactory.getProcessor(context, sinks);
Assert.assertEquals(sp.getClass(), sp2.getClass());
}