### Question:
FieldPath { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } FieldPath fieldPath = (FieldPath) o; return internalPath.equals(fieldPath.internalPath); } private  FieldPath(List<String> segments); private  FieldPath(com.google.firebase.firestore.model.FieldPath internalPath); @NonNull static FieldPath of(String... fieldNames); @NonNull static FieldPath documentId(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testEquals() { FieldPath foo = FieldPath.of("f", "o", "o"); FieldPath fooDup = FieldPath.of("f", "o", "o"); FieldPath bar = FieldPath.of("b", "a", "r"); assertEquals(foo, fooDup); assertNotEquals(foo, bar); assertEquals(foo.hashCode(), fooDup.hashCode()); assertNotEquals(foo.hashCode(), bar.hashCode()); }