test_class.declarator: projectMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Project projectMock;
test_class.type: Project
test_class.var_name: projectMock
test_class.declarator: otherProjectMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Project otherProjectMock;
test_class.type: Project
test_class.var_name: otherProjectMock
test_class.declarator: userMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private User userMock;
test_class.type: User
test_class.var_name: userMock
test_class.declarator: otherUserMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private User otherUserMock;
test_class.type: User
test_class.var_name: otherUserMock
test_class.file: backend/project-board/src/test/java/de/adesso/projectboard/base/application/persistence/ProjectApplicationTest.java
test_class.identifier: ProjectApplicationTest
test_case.body: @Test
      public void equalsReturnsFalseForDifferentDate() {
          // given
          long applicationId = 1;
          var userId = "user";
          var comment = "This is a comment!";
          var date = LocalDateTime.now();
          var otherDate = date.minus(1L, ChronoUnit.MINUTES);
  
          given(userMock.getId()).willReturn(userId);
  
          var application = new ProjectApplication(projectMock, comment, userMock, date);
          application.id = applicationId;
  
          var otherApplication = new ProjectApplication(projectMock, comment, userMock, otherDate);
          otherApplication.id = applicationId;
  
          // when
          boolean actualEquals = application.equals(otherApplication);
  
          // then
          assertThat(actualEquals).isFalse();
      }
test_case.class_method_signature: ProjectApplicationTest.equalsReturnsFalseForDifferentDate()
test_case.full_signature: @Test public void equalsReturnsFalseForDifferentDate()
test_case.identifier: equalsReturnsFalseForDifferentDate
test_case.invocations: now minus willReturn given getId equals isFalse assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void equalsReturnsFalseForDifferentDate()
focal_class.declarator: id
focal_class.modifier: @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
focal_class.original_string: @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      Long id;
focal_class.type: Long
focal_class.var_name: id
focal_class.declarator: project
focal_class.modifier: @ManyToOne
      @JoinColumn(
              name = "PROJECT_ID",
              nullable = false
      )
focal_class.original_string: @ManyToOne
      @JoinColumn(
              name = "PROJECT_ID",
              nullable = false
      )
      Project project;
focal_class.type: Project
focal_class.var_name: project
focal_class.declarator: user
focal_class.modifier: @ManyToOne
      @JoinColumn(
              name = "USER_ID",
              nullable = false
      )
focal_class.original_string: @ManyToOne
      @JoinColumn(
              name = "USER_ID",
              nullable = false
      )
      User user;
focal_class.type: User
focal_class.var_name: user
focal_class.declarator: comment
focal_class.modifier: @Lob
      @Column(
              name = "APPLICATION_COMMENT",
              length = 4096
      )
focal_class.original_string: @Lob
      @Column(
              name = "APPLICATION_COMMENT",
              length = 4096
      )
      String comment;
focal_class.type: String
focal_class.var_name: comment
focal_class.declarator: applicationDate
focal_class.modifier: @Column(
              name = "APPLICATION_DATE",
              nullable = false
      )
focal_class.original_string: @Column(
              name = "APPLICATION_DATE",
              nullable = false
      )
      LocalDateTime applicationDate;
focal_class.type: LocalDateTime
focal_class.var_name: applicationDate
focal_class.file: backend/project-board/src/main/java/de/adesso/projectboard/base/application/persistence/ProjectApplication.java
focal_class.identifier: ProjectApplication
focal_class.class_method_signature: ProjectApplication.ProjectApplication(Project project, String comment, User user, LocalDateTime applicationDate)
focal_class.full_signature: public  ProjectApplication(Project project, String comment, User user, LocalDateTime applicationDate)
focal_class.identifier: ProjectApplication
focal_class.modifiers: public
focal_class.parameters: (Project project, String comment, User user, LocalDateTime applicationDate)
focal_class.signature:  ProjectApplication(Project project, String comment, User user, LocalDateTime applicationDate)
focal_class.class_method_signature: ProjectApplication.equals(Object obj)
focal_class.full_signature: @Override public boolean equals(Object obj)
focal_class.identifier: equals
focal_class.modifiers: @Override public
focal_class.parameters: (Object obj)
focal_class.return: boolean
focal_class.signature: boolean equals(Object obj)
focal_class.class_method_signature: ProjectApplication.hashCode()
focal_class.full_signature: @Override public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_method.body: @Override
      public boolean equals(Object obj) {
          if(this == obj) {
              return true;
          }
  
          if(obj instanceof ProjectApplication) {
              ProjectApplication other = (ProjectApplication) obj;
  
              // only compare the user IDs because of the cyclic reference: User <-> Application
              boolean userEquals = Objects.nonNull(this.user) && Objects.nonNull(other.user)
                      && Objects.equals(this.user.getId(), other.user.getId());
  
              return userEquals &&
                      Objects.equals(this.id, other.id) &&
                      Objects.equals(this.comment, other.comment) &&
                      Objects.equals(this.project, other.project) &&
                      Objects.equals(this.applicationDate, other.applicationDate);
          }
  
          return false;
      }
focal_method.class_method_signature: ProjectApplication.equals(Object obj)
focal_method.full_signature: @Override public boolean equals(Object obj)
focal_method.identifier: equals
focal_method.invocations: nonNull nonNull equals getId getId equals equals equals equals
focal_method.modifiers: @Override public
focal_method.parameters: (Object obj)
focal_method.return: boolean
focal_method.signature: boolean equals(Object obj)