CaseActionSummary { public static Builder builder() { return new Builder(); } CaseActionSummary(); static Builder builder(); Long getId(); void setId(Long id); String getName(); void setName(String name); String getType(); void setType(String type); Date getCreatedOn(); void setCreatedOn(Date createdOn); CaseStageSummary getStage(); void setStage(CaseStageSummary stage); String getActualOwner(); void setActualOwner(String actualOwner); CaseActionType getActionType(); void setActionType(CaseActionType actionType); CaseActionStatus getActionStatus(); void setActionStatus(CaseActionStatus actionStatus); @Override boolean equals(Object o); @Override @SuppressWarnings("PMD.AvoidMultipleUnaryOperators") int hashCode(); @Override String toString();  }
@Test public void testSameNameAndStatusEquals() { CaseActionSummary cas1 = CaseActionSummary.builder().name("test").id(1l).actionStatus(CaseActionStatus.AVAILABLE).build(); CaseActionSummary cas2 = CaseActionSummary.builder().name("test").id(2l).actionStatus(CaseActionStatus.AVAILABLE).build(); assertEquals(cas1, cas2); }
@Test public void testSameNameAndDifferentStatusEquals() { CaseActionSummary cas1 = CaseActionSummary.builder().name("test").id(1l).actionStatus(CaseActionStatus.AVAILABLE).build(); CaseActionSummary cas2 = CaseActionSummary.builder().name("test").id(1l).actionStatus(CaseActionStatus.IN_PROGRESS).build(); assertNotEquals(cas1, cas2); }
@Test public void testSameIdAndStatusEquals() { CaseActionSummary cas1 = CaseActionSummary.builder().name("test1").id(1l).actionStatus(CaseActionStatus.IN_PROGRESS).build(); CaseActionSummary cas2 = CaseActionSummary.builder().name("test2").id(1l).actionStatus(CaseActionStatus.IN_PROGRESS).build(); assertEquals(cas1, cas2); }
@Test public void testSameIdAndStatusDifferentTypeEquals() { CaseActionSummary cas1 = CaseActionSummary.builder().name("test1").id(1l).actionStatus(CaseActionStatus.IN_PROGRESS).type("SubProcessNode").build(); CaseActionSummary cas2 = CaseActionSummary.builder().name("test1").id(1l).actionStatus(CaseActionStatus.IN_PROGRESS).type("HumanTaskNode").build(); assertNotEquals(cas1, cas2); }