@Test public void clone_NOT_NULL() { JudgmentSeriesCriteria sourceCriteria = new JudgmentSeriesCriteria(); sourceCriteria.setCcCourtDivisionId(12L); sourceCriteria.setCcCourtId(10L); sourceCriteria.setCcIncludeDependentCourtJudgments(true); sourceCriteria.setCourtType(CourtType.COMMON); sourceCriteria.setScCourtChamberDivisionId(122L); sourceCriteria.setScCourtChamberId(1200L); sourceCriteria.setStartJudgmentDate(new LocalDate()); sourceCriteria.setEndJudgmentDate(new LocalDate()); sourceCriteria.setPhrase("CARS"); JudgmentSeriesCriteria clonedCriteria = judgmentSeriesCriteriaCloner.clone(sourceCriteria); assertNotNull(clonedCriteria); assertFalse(sourceCriteria == clonedCriteria); assertEquals(sourceCriteria, clonedCriteria); }
public JudgmentSeriesCriteria clone(JudgmentSeriesCriteria sourceCriteria) { Preconditions.checkNotNull(sourceCriteria); JudgmentSeriesCriteria copiedCriteria = new JudgmentSeriesCriteria(); BeanUtils.copyProperties(sourceCriteria, copiedCriteria); return copiedCriteria; }
JudgmentSeriesCriteriaCloner { public JudgmentSeriesCriteria clone(JudgmentSeriesCriteria sourceCriteria) { Preconditions.checkNotNull(sourceCriteria); JudgmentSeriesCriteria copiedCriteria = new JudgmentSeriesCriteria(); BeanUtils.copyProperties(sourceCriteria, copiedCriteria); return copiedCriteria; } }
JudgmentSeriesCriteriaCloner { public JudgmentSeriesCriteria clone(JudgmentSeriesCriteria sourceCriteria) { Preconditions.checkNotNull(sourceCriteria); JudgmentSeriesCriteria copiedCriteria = new JudgmentSeriesCriteria(); BeanUtils.copyProperties(sourceCriteria, copiedCriteria); return copiedCriteria; }  }
JudgmentSeriesCriteriaCloner { public JudgmentSeriesCriteria clone(JudgmentSeriesCriteria sourceCriteria) { Preconditions.checkNotNull(sourceCriteria); JudgmentSeriesCriteria copiedCriteria = new JudgmentSeriesCriteria(); BeanUtils.copyProperties(sourceCriteria, copiedCriteria); return copiedCriteria; }  JudgmentSeriesCriteria clone(JudgmentSeriesCriteria sourceCriteria); }
JudgmentSeriesCriteriaCloner { public JudgmentSeriesCriteria clone(JudgmentSeriesCriteria sourceCriteria) { Preconditions.checkNotNull(sourceCriteria); JudgmentSeriesCriteria copiedCriteria = new JudgmentSeriesCriteria(); BeanUtils.copyProperties(sourceCriteria, copiedCriteria); return copiedCriteria; }  JudgmentSeriesCriteria clone(JudgmentSeriesCriteria sourceCriteria);  }