@Test
public void testEquals() {

  final StructDefinitionType t1 = new StructDefinitionType(new StructNameType("astruct"),
      Arrays.asList("x", "y"),
      Arrays.asList(BasicType.MAT4X4, BasicType.VEC4));
  final StructDefinitionType t2 = new StructDefinitionType(new StructNameType("astruct"),
      Arrays.asList("x", "y"),
      Arrays.asList(BasicType.MAT4X4, BasicType.VEC4));
  final StructDefinitionType t3 = new StructDefinitionType(new StructNameType("anotherstruct"),
      Arrays.asList("x", "y"),
      Arrays.asList(BasicType.MAT4X4, BasicType.VEC4));
  final StructDefinitionType t4 = new StructDefinitionType(Optional.empty(),
      Arrays.asList("x", "y"),
      Arrays.asList(BasicType.MAT4X4, BasicType.VEC4));
  final StructDefinitionType t5 = new StructDefinitionType(Optional.empty(),
      Arrays.asList("x", "y"),
      Arrays.asList(BasicType.MAT4X4, BasicType.VEC4));
  final StructDefinitionType t6 = new StructDefinitionType(Optional.empty(),
      Arrays.asList("x", "y"),
      Arrays.asList(BasicType.MAT3X4, BasicType.VEC4));
  assertEquals(t1, t2);
  assertEquals(t1.hashCode(), t2.hashCode());
  assertEquals(t4, t5);
  assertEquals(t4.hashCode(), t5.hashCode());
  assertNotEquals(t1, t3);
  assertNotEquals(t1, t4);
  assertNotEquals(t5, t6);
}