### Question:
RowTypeInfo extends TupleTypeInfoBase<Row> { public boolean schemaEquals(Object obj) { return equals(obj) && Arrays.equals(fieldNames, ((RowTypeInfo) obj).fieldNames); } RowTypeInfo(TypeInformation<?>... types);  RowTypeInfo(TypeInformation<?>[] types, String[] fieldNames); @Override void getFlatFields(String fieldExpression, int offset, List<FlatFieldDescriptor> result); @Override TypeInformation<X> getTypeAt(String fieldExpression); @Override TypeComparator<Row> createComparator(
		int[] logicalKeyFields,
		boolean[] orders,
		int logicalFieldOffset,
		ExecutionConfig config); @Override String[] getFieldNames(); @Override int getFieldIndex(String fieldName); @Override TypeSerializer<Row> createSerializer(ExecutionConfig config); @Override boolean canEqual(Object obj); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); TypeInformation<?>[] getFieldTypes(); boolean schemaEquals(Object obj); static RowTypeInfo projectFields(RowTypeInfo rowType, int[] fieldMapping);  }### Answer:
@Test public void testSchemaEquals() { final RowTypeInfo row1 = new RowTypeInfo( new TypeInformation[]{BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO}, new String[] {"field1", "field2"}); final RowTypeInfo row2 = new RowTypeInfo( new TypeInformation[]{BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO}, new String[] {"field1", "field2"}); assertTrue(row1.schemaEquals(row2)); final RowTypeInfo other1 = new RowTypeInfo( new TypeInformation[]{BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO}, new String[] {"otherField", "field2"}); final RowTypeInfo other2 = new RowTypeInfo( new TypeInformation[]{BasicTypeInfo.LONG_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO}, new String[] {"field1", "field2"}); assertFalse(row1.schemaEquals(other1)); assertFalse(row1.schemaEquals(other2)); }