CommitCherryPickConflictResolve { boolean isApplicable(String targetBranch, String commit) { Assert.hasLength(targetBranch); Assert.hasLength(commit); return targetBranch.equals(this.targetBranch) && commit.equals(this.commit); } CommitCherryPickConflictResolve(String targetBranch, String commit, String text); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void isApplicable() { assertTrue(resolve.isApplicable(BRANCH, COMMIT)); assertFalse(resolve.isApplicable("branch2", COMMIT)); assertFalse(resolve.isApplicable(BRANCH, "commit2")); }