diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/AbstractPhaseDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/AbstractPhaseDTO.java
index c49c0a5131dcc87cf369bb6651cd7c5f1acc22b9..b43a9a01a12badc37d9d0c0cf60260521c3f40db 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/AbstractPhaseDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/AbstractPhaseDTO.java
@@ -3,6 +3,8 @@ package cz.muni.ics.kypo.training.adaptive.dto;
 import cz.muni.ics.kypo.training.adaptive.enums.PhaseType;
 import io.swagger.annotations.ApiModelProperty;
 
+import java.util.Objects;
+
 public abstract class AbstractPhaseDTO {
 
     @ApiModelProperty(value = "ID of task", required = true, example = "1")
@@ -49,6 +51,22 @@ public abstract class AbstractPhaseDTO {
         this.phaseType = phaseType;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        AbstractPhaseDTO that = (AbstractPhaseDTO) o;
+        return Objects.equals(id, that.id) &&
+                Objects.equals(title, that.title) &&
+                Objects.equals(order, that.order) &&
+                phaseType == that.phaseType;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(id, title, order, phaseType);
+    }
+
     @Override
     public String toString() {
         return "AbstractPhaseDto{" +
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/PhaseCreateDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/PhaseCreateDTO.java
index be9eb771a319075f6c01ed07b5fa82a338b0b15d..f994fa3bd63d279a0120887362082827ea66dac4 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/PhaseCreateDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/PhaseCreateDTO.java
@@ -4,6 +4,7 @@ import cz.muni.ics.kypo.training.adaptive.enums.PhaseTypeCreate;
 import io.swagger.annotations.ApiModelProperty;
 
 import javax.validation.constraints.NotNull;
+import java.util.Objects;
 
 public class PhaseCreateDTO {
 
@@ -19,6 +20,19 @@ public class PhaseCreateDTO {
         this.phaseType = phaseType;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        PhaseCreateDTO that = (PhaseCreateDTO) o;
+        return phaseType == that.phaseType;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(phaseType);
+    }
+
     @Override
     public String toString() {
         return "PhaseCreateDTO{" +
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/info/InfoPhaseDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/info/InfoPhaseDTO.java
index e0bb00a0174559e4c8bb37f70b62423e0e913d2e..021142627aa951077cd5c531e05e6aea957ab56e 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/info/InfoPhaseDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/info/InfoPhaseDTO.java
@@ -3,6 +3,8 @@ package cz.muni.ics.kypo.training.adaptive.dto.info;
 import cz.muni.ics.kypo.training.adaptive.dto.AbstractPhaseDTO;
 import io.swagger.annotations.ApiModelProperty;
 
+import java.util.Objects;
+
 public class InfoPhaseDTO extends AbstractPhaseDTO {
 
     @ApiModelProperty(value = "Short description of info phase", required = true, example = "Info phase title")
@@ -16,6 +18,18 @@ public class InfoPhaseDTO extends AbstractPhaseDTO {
         this.content = content;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        InfoPhaseDTO that = (InfoPhaseDTO) o;
+        return Objects.equals(content, that.content);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(content);
+    }
 
     @Override
     public String toString() {
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/info/InfoPhaseUpdateDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/info/InfoPhaseUpdateDTO.java
index 96f30a521fac8cb7c32b851e2ef638eb12b74dcf..3daeb4bdb65ef938c600ee5a71f362d10686854b 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/info/InfoPhaseUpdateDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/info/InfoPhaseUpdateDTO.java
@@ -3,6 +3,7 @@ package cz.muni.ics.kypo.training.adaptive.dto.info;
 import io.swagger.annotations.ApiModelProperty;
 
 import javax.validation.constraints.NotEmpty;
+import java.util.Objects;
 
 public class InfoPhaseUpdateDTO {
 
@@ -30,6 +31,20 @@ public class InfoPhaseUpdateDTO {
         this.content = content;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        InfoPhaseUpdateDTO that = (InfoPhaseUpdateDTO) o;
+        return Objects.equals(title, that.title) &&
+                Objects.equals(content, that.content);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(title, content);
+    }
+
     @Override
     public String toString() {
         return "InfoPhaseUpdateDto{" +
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/AbstractQuestionDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/AbstractQuestionDTO.java
index 23aebe36b8fbd4658283aac8c5cb1b26fc362ecf..4e9fdbfb972e945b03312cd50c754b634cde4f4a 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/AbstractQuestionDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/AbstractQuestionDTO.java
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
 import java.util.List;
+import java.util.Objects;
 
 public abstract class AbstractQuestionDTO {
 
@@ -55,4 +56,30 @@ public abstract class AbstractQuestionDTO {
     public void setChoices(List<QuestionChoiceDTO> choices) {
         this.choices = choices;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        AbstractQuestionDTO that = (AbstractQuestionDTO) o;
+        return order == that.order &&
+                Objects.equals(text, that.text) &&
+                questionType == that.questionType &&
+                Objects.equals(choices, that.choices);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(order, text, questionType, choices);
+    }
+
+    @Override
+    public String toString() {
+        return "AbstractQuestionDTO{" +
+                "order=" + order +
+                ", text='" + text + '\'' +
+                ", questionType=" + questionType +
+                ", choices=" + choices +
+                '}';
+    }
 }
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionChoiceDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionChoiceDTO.java
index a9b2326b97b4a694932e138a3a0dfd247e44b8af..a6b5f5c8b2801c67ca34b167f804e086496da2aa 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionChoiceDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionChoiceDTO.java
@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
 
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
+import java.util.Objects;
 
 public class QuestionChoiceDTO {
 
@@ -53,4 +54,30 @@ public class QuestionChoiceDTO {
     public void setOrder(Integer order) {
         this.order = order;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        QuestionChoiceDTO that = (QuestionChoiceDTO) o;
+        return Objects.equals(id, that.id) &&
+                Objects.equals(text, that.text) &&
+                Objects.equals(correct, that.correct) &&
+                Objects.equals(order, that.order);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(id, text, correct, order);
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionChoiceDTO{" +
+                "id=" + id +
+                ", text='" + text + '\'' +
+                ", correct=" + correct +
+                ", order=" + order +
+                '}';
+    }
 }
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionDTO.java
index 89827a0364daaed94fe0206fec5126be1e755aa3..4cec7eda79a28fe013f4a6a5ef73df5c5894f2ec 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionDTO.java
@@ -2,6 +2,8 @@ package cz.muni.ics.kypo.training.adaptive.dto.questionnaire;
 
 import io.swagger.annotations.ApiModelProperty;
 
+import java.util.Objects;
+
 public class QuestionDTO extends AbstractQuestionDTO {
 
     @ApiModelProperty(value = "Question ID. Leave blank if a new question is added", required = true, example = "1")
@@ -14,4 +16,25 @@ public class QuestionDTO extends AbstractQuestionDTO {
     public void setId(Long id) {
         this.id = id;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        if (!super.equals(o)) return false;
+        QuestionDTO that = (QuestionDTO) o;
+        return Objects.equals(id, that.id);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(super.hashCode(), id);
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionDTO{" +
+                "id=" + id +
+                "} " + super.toString();
+    }
 }
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionPhaseRelationDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionPhaseRelationDTO.java
index a8f647c2984f9b94e397b8a7db0d5fc3335b9c1f..50b17db9fcfca9f8f146c87638b5b5cec981e1fc 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionPhaseRelationDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionPhaseRelationDTO.java
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import javax.validation.constraints.Max;
 import javax.validation.constraints.Min;
 import javax.validation.constraints.NotNull;
+import java.util.Objects;
 import java.util.Set;
 
 public class QuestionPhaseRelationDTO {
@@ -67,4 +68,32 @@ public class QuestionPhaseRelationDTO {
     public void setSuccessRate(int successRate) {
         this.successRate = successRate;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        QuestionPhaseRelationDTO that = (QuestionPhaseRelationDTO) o;
+        return successRate == that.successRate &&
+                Objects.equals(id, that.id) &&
+                Objects.equals(order, that.order) &&
+                Objects.equals(questionIds, that.questionIds) &&
+                Objects.equals(phaseId, that.phaseId);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(id, order, questionIds, phaseId, successRate);
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionPhaseRelationDTO{" +
+                "id=" + id +
+                ", order=" + order +
+                ", questionIds=" + questionIds +
+                ", phaseId=" + phaseId +
+                ", successRate=" + successRate +
+                '}';
+    }
 }
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionnairePhaseDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionnairePhaseDTO.java
index acaffe5bc55d727131371b13bce9fc20499646bf..d2d8722e2075d7f1bf0e1d0166d37c74f6062ccc 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionnairePhaseDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionnairePhaseDTO.java
@@ -5,6 +5,7 @@ import cz.muni.ics.kypo.training.adaptive.enums.QuestionnaireType;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.util.List;
+import java.util.Objects;
 
 public class QuestionnairePhaseDTO extends AbstractPhaseDTO {
 
@@ -40,4 +41,28 @@ public class QuestionnairePhaseDTO extends AbstractPhaseDTO {
     public void setPhaseRelations(List<QuestionPhaseRelationDTO> phaseRelations) {
         this.phaseRelations = phaseRelations;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        QuestionnairePhaseDTO that = (QuestionnairePhaseDTO) o;
+        return Objects.equals(questions, that.questions) &&
+                questionnaireType == that.questionnaireType &&
+                Objects.equals(phaseRelations, that.phaseRelations);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(questions, questionnaireType, phaseRelations);
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionnairePhaseDTO{" +
+                "questions=" + questions +
+                ", questionnaireType=" + questionnaireType +
+                ", phaseRelations=" + phaseRelations +
+                "} " + super.toString();
+    }
 }
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionnaireUpdateDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionnaireUpdateDTO.java
index 6d7c6c5509e9028117f8d2b100cd01070df12d60..4d1b34fa286897f06a1595922231b59b3f43d663 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionnaireUpdateDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/questionnaire/QuestionnaireUpdateDTO.java
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import javax.validation.Valid;
 import javax.validation.constraints.NotEmpty;
 import java.util.List;
+import java.util.Objects;
 
 public class QuestionnaireUpdateDTO {
 
@@ -44,6 +45,21 @@ public class QuestionnaireUpdateDTO {
         this.phaseRelations = phaseRelations;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        QuestionnaireUpdateDTO that = (QuestionnaireUpdateDTO) o;
+        return Objects.equals(title, that.title) &&
+                Objects.equals(questions, that.questions) &&
+                Objects.equals(phaseRelations, that.phaseRelations);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(title, questions, phaseRelations);
+    }
+
     @Override
     public String toString() {
         return "QuestionnaireUpdateDto{" +
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/DecisionMatrixRowDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/DecisionMatrixRowDTO.java
index ec7a0b37e594e865a48ae59da48c865964922fb7..73bff497613b0616331c3460a8989e55ab9eac29 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/DecisionMatrixRowDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/DecisionMatrixRowDTO.java
@@ -2,6 +2,8 @@ package cz.muni.ics.kypo.training.adaptive.dto.training;
 
 import io.swagger.annotations.ApiModelProperty;
 
+import java.util.Objects;
+
 public class DecisionMatrixRowDTO {
 
     @ApiModelProperty(value = "ID of decision matrix row", required = true, example = "1")
@@ -81,6 +83,25 @@ public class DecisionMatrixRowDTO {
         this.wrongAnswers = wrongAnswers;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        DecisionMatrixRowDTO that = (DecisionMatrixRowDTO) o;
+        return id == that.id &&
+                order == that.order &&
+                Double.compare(that.assessmentAnswered, assessmentAnswered) == 0 &&
+                Double.compare(that.keywordUsed, keywordUsed) == 0 &&
+                Double.compare(that.completedInTime, completedInTime) == 0 &&
+                Double.compare(that.solutionDisplayed, solutionDisplayed) == 0 &&
+                Double.compare(that.wrongAnswers, wrongAnswers) == 0;
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(id, order, assessmentAnswered, keywordUsed, completedInTime, solutionDisplayed, wrongAnswers);
+    }
+
     @Override
     public String toString() {
         return "DecisionMatrixRow{" +
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskCopyDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskCopyDTO.java
index c4704b9f0d6d73434535c54151997d0edfb90251..a27dd18ea55fa5b65bcaba171b826a23a930ea8b 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskCopyDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskCopyDTO.java
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
 import javax.validation.constraints.PositiveOrZero;
+import java.util.Objects;
 
 public class TaskCopyDTO {
 
@@ -92,6 +93,25 @@ public class TaskCopyDTO {
         this.sandboxChangeExpectedDuration = sandboxChangeExpectedDuration;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        TaskCopyDTO that = (TaskCopyDTO) o;
+        return modifySandbox == that.modifySandbox &&
+                sandboxChangeExpectedDuration == that.sandboxChangeExpectedDuration &&
+                Objects.equals(title, that.title) &&
+                Objects.equals(content, that.content) &&
+                Objects.equals(answer, that.answer) &&
+                Objects.equals(solution, that.solution) &&
+                Objects.equals(incorrectAnswerLimit, that.incorrectAnswerLimit);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(title, content, answer, solution, incorrectAnswerLimit, modifySandbox, sandboxChangeExpectedDuration);
+    }
+
     @Override
     public String toString() {
         return "TaskCopyDTO{" +
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskDTO.java
index 251aabf06d799ea081948b3a6a1fd691e907acad..9a8561b110b78af3ec2121a8cc82a6d4b7a0ce61 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskDTO.java
@@ -2,6 +2,8 @@ package cz.muni.ics.kypo.training.adaptive.dto.training;
 
 import io.swagger.annotations.ApiModelProperty;
 
+import java.util.Objects;
+
 public class TaskDTO {
 
     @ApiModelProperty(value = "ID of task", required = true, example = "1")
@@ -103,6 +105,27 @@ public class TaskDTO {
         this.sandboxChangeExpectedDuration = sandboxChangeExpectedDuration;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        TaskDTO taskDTO = (TaskDTO) o;
+        return incorrectAnswerLimit == taskDTO.incorrectAnswerLimit &&
+                modifySandbox == taskDTO.modifySandbox &&
+                sandboxChangeExpectedDuration == taskDTO.sandboxChangeExpectedDuration &&
+                Objects.equals(id, taskDTO.id) &&
+                Objects.equals(title, taskDTO.title) &&
+                Objects.equals(order, taskDTO.order) &&
+                Objects.equals(content, taskDTO.content) &&
+                Objects.equals(answer, taskDTO.answer) &&
+                Objects.equals(solution, taskDTO.solution);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(id, title, order, content, answer, solution, incorrectAnswerLimit, modifySandbox, sandboxChangeExpectedDuration);
+    }
+
     @Override
     public String toString() {
         return "TaskDTO{" +
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskUpdateDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskUpdateDTO.java
index e53f7379c7095438df2b341dbf1f9fd2542f36d0..b7ede0b1a415056b624efec5a5ed76d9455632e6 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskUpdateDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TaskUpdateDTO.java
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
 import javax.validation.constraints.PositiveOrZero;
+import java.util.Objects;
 
 public class TaskUpdateDTO {
 
@@ -92,6 +93,25 @@ public class TaskUpdateDTO {
         this.sandboxChangeExpectedDuration = sandboxChangeExpectedDuration;
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        TaskUpdateDTO that = (TaskUpdateDTO) o;
+        return modifySandbox == that.modifySandbox &&
+                sandboxChangeExpectedDuration == that.sandboxChangeExpectedDuration &&
+                Objects.equals(title, that.title) &&
+                Objects.equals(content, that.content) &&
+                Objects.equals(answer, that.answer) &&
+                Objects.equals(solution, that.solution) &&
+                Objects.equals(incorrectAnswerLimit, that.incorrectAnswerLimit);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(title, content, answer, solution, incorrectAnswerLimit, modifySandbox, sandboxChangeExpectedDuration);
+    }
+
     @Override
     public String toString() {
         return "TaskUpdateDTO{" +
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TrainingPhaseDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TrainingPhaseDTO.java
index ffe223821fe68fce8d843737e35949a2daf6b726..65320f1904554a63b0a393fad14514fefbb4e110 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TrainingPhaseDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TrainingPhaseDTO.java
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Objects;
 
 public class TrainingPhaseDTO extends AbstractPhaseDTO {
 
@@ -62,4 +63,32 @@ public class TrainingPhaseDTO extends AbstractPhaseDTO {
     public void setDecisionMatrix(List<DecisionMatrixRowDTO> decisionMatrix) {
         this.decisionMatrix = decisionMatrix;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        TrainingPhaseDTO that = (TrainingPhaseDTO) o;
+        return estimatedDuration == that.estimatedDuration &&
+                allowedCommands == that.allowedCommands &&
+                allowedWrongAnswers == that.allowedWrongAnswers &&
+                Objects.equals(tasks, that.tasks) &&
+                Objects.equals(decisionMatrix, that.decisionMatrix);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(estimatedDuration, allowedCommands, allowedWrongAnswers, tasks, decisionMatrix);
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingPhaseDTO{" +
+                "estimatedDuration=" + estimatedDuration +
+                ", allowedCommands=" + allowedCommands +
+                ", allowedWrongAnswers=" + allowedWrongAnswers +
+                ", tasks=" + tasks +
+                ", decisionMatrix=" + decisionMatrix +
+                "} " + super.toString();
+    }
 }
diff --git a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TrainingPhaseUpdateDTO.java b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TrainingPhaseUpdateDTO.java
index 5aa47bc776847cd48c47c2348950b88f2d2e68d4..392dd0be17438f371e50ff41db3bccfddbbbdfe2 100644
--- a/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TrainingPhaseUpdateDTO.java
+++ b/src/main/java/cz/muni/ics/kypo/training/adaptive/dto/training/TrainingPhaseUpdateDTO.java
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
 import javax.validation.constraints.NotEmpty;
 import javax.validation.constraints.NotNull;
 import java.util.List;
+import java.util.Objects;
 
 public class TrainingPhaseUpdateDTO {
 
@@ -67,4 +68,32 @@ public class TrainingPhaseUpdateDTO {
     public void setDecisionMatrix(List<DecisionMatrixRowDTO> decisionMatrix) {
         this.decisionMatrix = decisionMatrix;
     }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        TrainingPhaseUpdateDTO that = (TrainingPhaseUpdateDTO) o;
+        return Objects.equals(title, that.title) &&
+                Objects.equals(allowedWrongAnswers, that.allowedWrongAnswers) &&
+                Objects.equals(allowedCommands, that.allowedCommands) &&
+                Objects.equals(estimatedDuration, that.estimatedDuration) &&
+                Objects.equals(decisionMatrix, that.decisionMatrix);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(title, allowedWrongAnswers, allowedCommands, estimatedDuration, decisionMatrix);
+    }
+
+    @Override
+    public String toString() {
+        return "TrainingPhaseUpdateDTO{" +
+                "title='" + title + '\'' +
+                ", allowedWrongAnswers=" + allowedWrongAnswers +
+                ", allowedCommands=" + allowedCommands +
+                ", estimatedDuration=" + estimatedDuration +
+                ", decisionMatrix=" + decisionMatrix +
+                '}';
+    }
 }