Thanks for updating in v2 patch. The patch looks good to me but a minor issue below:
The method of checkTargetsOnDifferentNodeGroup() in TestReplicationPolicyWithNodeGroup(), you should use indent 2 instead of 3:
if(targets.length == 0)
Can you correct it and post the test-patch result on branch-1? Thanks!
BTW, you don't have to remove previous patch in updating a new one. Also, for non-trunk patch, please get rid of submit patch. As current pre-commit test only for trunk branch.