PojoTypeInfo extends CompositeType<T> { @Override public boolean equals(Object obj) { if (obj instanceof PojoTypeInfo) { @SuppressWarnings("unchecked") PojoTypeInfo<T> pojoTypeInfo = (PojoTypeInfo<T>)obj; return pojoTypeInfo.canEqual(this) && super.equals(pojoTypeInfo) && Arrays.equals(fields, pojoTypeInfo.fields) && totalFields == pojoTypeInfo.totalFields; } else { return false; } } @PublicEvolving  PojoTypeInfo(Class<T> typeClass, List<PojoField> fields); @Override @PublicEvolving boolean isBasicType(); @Override @PublicEvolving boolean isTupleType(); @Override @PublicEvolving int getArity(); @Override @PublicEvolving int getTotalFields(); @Override @PublicEvolving boolean isSortKeyType(); @Override @PublicEvolving void getFlatFields(String fieldExpression, int offset, List<FlatFieldDescriptor> result); @SuppressWarnings("unchecked") @Override @PublicEvolving TypeInformation<X> getTypeAt(String fieldExpression); @Override @PublicEvolving TypeInformation<X> getTypeAt(int pos); @PublicEvolving PojoField getPojoFieldAt(int pos); @PublicEvolving String[] getFieldNames(); @Override @PublicEvolving int getFieldIndex(String fieldName); @Override @PublicEvolving TypeSerializer<T> createSerializer(ExecutionConfig config); @Override boolean equals(Object obj); @Override int hashCode(); @Override boolean canEqual(Object obj); @Override String toString();  }
@Test public void testPojoTypeInfoInequality() { try { TypeInformation<TestPojo> info1 = TypeExtractor.getForClass(TestPojo.class); TypeInformation<AlternatePojo> info2 = TypeExtractor.getForClass(AlternatePojo.class); assertTrue(info1 instanceof PojoTypeInfo); assertTrue(info2 instanceof PojoTypeInfo); assertFalse(info1.equals(info2)); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } }