assertEquals(toString, typeInfo.toString());
}
@Test
public void equalsHashCode() {
TypeInfo newType = factory.getType(getReturnType(ownerType, methodName));
if (typeInfo.getComponentType() instanceof RawTypeInfo) {
assertSame(newType, typeInfo);
} else {
assertEquals(newType, typeInfo);
assertNotSame(newType, typeInfo);
assertEquals(newType.hashCode(), typeInfo.hashCode());
}
newType = factory.getType(Exception[].class);
assertThat(typeInfo, not(equalTo(newType)));
assertNotSame(newType, typeInfo);
assertThat(typeInfo.hashCode(), not(equalTo(newType.hashCode())));
}