Metadata implements CreativeCommons, Geographic, HttpHeaders,
        Message, ClimateForcast, TIFF, TikaMimeKeys,
        Serializable { public boolean equals(Object o) { if (o == null) { return false; } Metadata other = null; try { other = (Metadata) o; } catch (ClassCastException cce) { return false; } if (other.size() != size()) { return false; } String[] names = names(); for (int i = 0; i < names.length; i++) { String[] otherValues = other._getValues(names[i]); String[] thisValues = _getValues(names[i]); if (otherValues.length != thisValues.length) { return false; } for (int j = 0; j < otherValues.length; j++) { if (!otherValues[j].equals(thisValues[j])) { return false; } } } return true; } Metadata(); boolean isMultiValued(final Property property); boolean isMultiValued(final String name); String[] names(); String get(final String name); String get(Property property); Integer getInt(Property property); Date getDate(Property property); String[] getValues(final Property property); String[] getValues(final String name); void add(final String name, final String value); void add(final Property property, final String value); @SuppressWarnings("unchecked") void setAll(Properties properties); void set(String name, String value); void set(Property property, String value); void set(Property property, String[] values); void set(Property property, int value); void add(Property property, int value); int[] getIntValues(Property property); void set(Property property, double value); void set(Property property, Date date); void set(Property property, Calendar date); void remove(String name); int size(); int hashCode(); boolean equals(Object o); String toString();  }
@Test public void testEquals() { Metadata meta1 = new Metadata(); meta1.add("key", "value1"); meta1.add("key", "value2"); meta1.add("key2", "value12"); Metadata meta2 = new Metadata(); meta2.add("key", "value1"); meta2.add("key", "value2"); meta2.add("key2", "value12"); assertEquals(meta1, meta2); }