LOG.info("Full Translation: " + trans);
LOG.info("logical Translation: " + logical);
LOG.info("failover Translation: " + failover);
FlumeConfigData transData0 = trans.getConfig("bar");
assertEquals("null", transData0.getSourceConfig());
String lh = NetUtils.localhost();
String translated = "< { lazyOpen => rpcSink( \"" + lh + "\", 35853 ) } ? "
+ "< { lazyOpen => rpcSink( \"" + lh + "\", 35855 ) } ? "
+ "< { lazyOpen => rpcSink( \"" + lh + "\", 35854 ) } ? null > > >";
assertEquals(translated, transData0.getSinkConfig());
trans.updateAll();
FlumeConfigData transData = trans.getConfig("bar");
long barVer = transData.getTimestamp();
assertEquals("null", transData.getSourceConfig());
assertEquals(translated, transData.getSinkConfig());
FlumeConfigData transCollData = trans.getConfig("foo");
long fooVer = transCollData.getTimestamp();
assertEquals("rpcSource( 35853 )", transCollData.getSourceConfig());
assertEquals("null", transCollData.getSinkConfig());
trans.updateAll();
transData = trans.getConfig("bar");
assertEquals(barVer, transData.getTimestamp());
assertEquals("null", transData.getSourceConfig());
assertEquals(translated, transData.getSinkConfig());
transCollData = trans.getConfig("foo");
assertEquals(fooVer, transCollData.getTimestamp());
assertEquals("rpcSource( 35853 )", transCollData.getSourceConfig());
assertEquals("null", transCollData.getSinkConfig());
trans.updateAll(); // TODO (jon) Ideally, this shouldn't be necessary
LOG.info("Full Translation: " + trans);
LOG.info("Logical Translation: " + logical);
LOG.info("Failover Translation: " + failover);
transData = trans.getConfig("bar");
assertEquals(barVer, transData.getTimestamp());
assertEquals("null", transData.getSourceConfig());
assertEquals(translated, transData.getSinkConfig());
transCollData = trans.getConfig("foo");
assertEquals(fooVer, transCollData.getTimestamp());
assertEquals("rpcSource( 35853 )", transCollData.getSourceConfig());
assertEquals("null", transCollData.getSinkConfig());
// intermediate data
FlumeConfigData failData = failover.getConfig("bar");
assertEquals("null", failData.getSourceConfig());
String failTranslated = "< { lazyOpen => logicalSink( \"foo\" ) } ? "
+ "< { lazyOpen => logicalSink( \"foo3\" ) } ? "
+ "< { lazyOpen => logicalSink( \"foo2\" ) } ? null > > >";
assertEquals(failTranslated, failData.getSinkConfig());
}