package org.corpus_tools.annis.gui.query_references;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;

import java.net.URI;
import java.util.Date;
import java.util.UUID;
import org.junit.jupiter.api.Test;

class UrlShortenerEntryTest {

  @Test
  void testEquals() {
    UrlShortenerEntry e1 = new UrlShortenerEntry();

    assertEquals(e1, e1);
    assertFalse(e1.equals(null));
    assertFalse(e1.equals("Someobject"));

    UrlShortenerEntry e2 = new UrlShortenerEntry();

    assertEquals(e1, e2);

    e1.setCreated(new Date());
    assertFalse(e1.equals(e2));
    e2.setCreated(e1.getCreated());
    assertEquals(e1, e2);

    e1.setId(UUID.randomUUID());
    assertFalse(e1.equals(e2));
    e2.setId(e1.getId());
    assertEquals(e1, e2);

    e1.setOwner("someone");
    assertFalse(e1.equals(e2));
    e2.setOwner(e1.getOwner());
    assertEquals(e1, e2);

    e1.setTemporaryUrl(URI.create("/"));
    assertFalse(e1.equals(e2));
    e2.setTemporaryUrl(e1.getTemporaryUrl());
    assertEquals(e1, e2);

    e1.setUrl(URI.create("/target"));
    assertFalse(e1.equals(e2));
    e2.setUrl(e1.getUrl());
    assertEquals(e1, e2);


  }

}

@@ -167,16 +167,80 @@
 rtFalse;
+%0Aimport static org.junit.jupiter.api.Assertions.assertNotEquals;
 %0A%0Aimport
@@ -520,32 +520,30 @@
   assert
-F
+NotEqu
 als
-e
 (e1
-.equals(
+, 
 %22Someobj
@@ -547,17 +547,16 @@
 object%22)
-)
 ;%0A%0A    U
@@ -671,36 +671,33 @@
   assert
-F
+NotEqu
 als
-e
 (e1
-.equals(
+, 
 e2)
-)
 ;%0A    e2
@@ -796,36 +796,33 @@
   assert
-F
+NotEqu
 als
-e
 (e1
-.equals(
+, 
 e2)
-)
 ;%0A    e2
@@ -906,36 +906,33 @@
   assert
-F
+NotEqu
 als
-e
 (e1
-.equals(
+, 
 e2)
-)
 ;%0A    e2
@@ -1035,36 +1035,33 @@
   assert
-F
+NotEqu
 als
-e
 (e1
-.equals(
+, 
 e2)
-)
 ;%0A    e2
@@ -1179,28 +1179,25 @@
 sert
-F
+NotEqu
 als
-e
 (e1
-.equals(
+, 
 e2)
-)
 ;%0A  

Replace assertFalse(e1.equals(e2)) with assertNotEquals().