@Test
  public void testDeleteProcessorNodeShouldDeleteTheCorrectProcessorNode() {
    String testProcessorId1 = "processorId1";
    String testProcessorId2 = "processorId2";

    ZkUtils zkUtils = getZkUtils();
    ZkUtils zkUtils1 = getZkUtils();

    zkUtils.registerProcessorAndGetId(new ProcessorData("host1", testProcessorId1));
    zkUtils1.registerProcessorAndGetId(new ProcessorData("host2", testProcessorId2));

    zkUtils.deleteProcessorNode(testProcessorId1);

    List<String> expectedProcessors = ImmutableList.of(testProcessorId2);
    List<String> actualProcessors = zkUtils.getSortedActiveProcessorsIDs();

    Assert.assertEquals(expectedProcessors, actualProcessors);
  }
Create two duplicate processors with same processorId.
Second creation should fail with exception.
samza-core/src/test/java/org/apache/samza/zk/TestZkUtils.java