### Question:
Property implements Comparable<Property> { @Override public int hashCode() { return Objects.hashCode(name, type); } Property(EntityType declaringType, String name, Type type);  Property(EntityType declaringType, String name, Type type, List<String> inits);  Property(EntityType declaringType, String name, Type type, List<String> inits,
            boolean inherited);  Property(EntityType declaringType, String name, String escapedName, Type type,
            List<String> inits, boolean inherited); void addAnnotation(Annotation annotation); @Override int compareTo(Property o); Property createCopy(EntityType targetModel); @SuppressWarnings("unchecked") T getAnnotation(Class<T> type); Collection<Annotation> getAnnotations(); @Override int hashCode(); @Override boolean equals(Object o); EntityType getDeclaringType(); String getEscapedName(); List<String> getInits(); String getName(); Type getParameter(int i); Map<Object, Object> getData(); Type getType(); boolean isInherited(); @Override String toString();  }### Answer:
@Test public void equals_and_hashCode() { Type typeModel = new SimpleType(TypeCategory.ENTITY, "com.querydsl.DomainClass", "com.querydsl", "DomainClass", false,false); EntityType type = new EntityType(typeModel); Property p1 = new Property(type, "property", type, Collections.<String>emptyList()); Property p2 = new Property(type, "property", type, Collections.<String>emptyList()); assertEquals(p1, p1); assertEquals(p1, p2); assertEquals(p1.hashCode(), p2.hashCode()); }