@Test
@SuppressWarnings("unlikely-arg-type")
public void testEquals() {

    StringType empty = new StringType("");
    StringType expected1 = new StringType("expected1");
    StringType expected2 = new StringType("expected2");
    assertEquals(empty.hashCode(), StringType.EMPTY.hashCode());
    assertEquals(empty.hashCode(), new StringType("").hashCode());
    assertEquals(empty.hashCode(), new StringType().hashCode());
    assertEquals(empty.hashCode(), new StringType(null).hashCode());
    assertEquals(expected1.hashCode(), new StringType("expected1").hashCode());
    assertEquals(expected2.hashCode(), new StringType("expected2").hashCode());
    assertNotEquals(expected1.hashCode(), new StringType("expected2").hashCode());
    assertEquals(empty, StringType.EMPTY);
    assertEquals(empty, new StringType(""));
    assertEquals(empty, new StringType());
    assertEquals(empty, new StringType(null));
    assertEquals(expected1, new StringType("expected1"));
    assertEquals(expected2, new StringType("expected2"));
    // Do not change to assertEquals(), because we want to check if .equals() works as expected!
    assertFalse(expected1.equals(new StringType("expected2")));
    assertFalse(expected2.equals(new StringType("expected1")));
    assertFalse(expected1.equals(StringType.EMPTY));
    assertFalse(expected2.equals(StringType.EMPTY));
    // Do not change to assertEquals(), because we want to check if .equals() works as expected!
    assertTrue(expected1.equals("expected1"));
    assertFalse(expected1.equals("expected2"));
    // Do not change to assertEquals(), because we want to check if .equals() works as expected!
    assertTrue(new StringType(null).equals(new StringType(null)));
    assertTrue(new StringType("").equals(new StringType(null)));
    assertTrue(new StringType(null).equals(new StringType("")));
}