@Test
public void testCheckConfig() {

  LogicalNode node = new LogicalNode(new Context(), "test-logical-node");
  assertFalse(node.checkConfig(null));
  // Are new configs accepted?
  FlumeConfigData cfgData = new FlumeConfigData(0, "null", "null", 0, 0,
      "my-test-flow");
  assertTrue(node.checkConfig(cfgData));
  assertFalse(node.checkConfig(cfgData));
  // Are updated configs accepted?
  FlumeConfigData cfgData2 = new FlumeConfigData(0, "null", "null", 1, 0,
      "my-test-flow");
  assertTrue(node.checkConfig(cfgData2));
  assertFalse(node.checkConfig(cfgData2));
  assertFalse(node.checkConfig(cfgData));
  // Are configs with the same version rejected?
  FlumeConfigData cfgData3 = new FlumeConfigData(0, "null", "null", 1, 1,
      "my-test-flow");
  assertFalse(node.checkConfig(cfgData));
  assertFalse(node.checkConfig(cfgData2));
  assertFalse(node.checkConfig(cfgData3));
}